Selecting Fields Available for Search

Last edit: Jun 10, 2019
  • Contributors:
  • pavelloz

Some use cases require you to select fields available for search. For example, you want to give your users the ability to search through users but only using their first_name.

Profile fields

query get_owners {
  people(query: { keyword: "John", fields: [{ name: "first_name" }] }) {
    results {
      first_name
    }
  }
}

Returns users whose first_name exactly matches John.

Properties

query get_providers {
  listings(
    query: { keyword: "20", fields: [{ name: "properties.service_radius" }] }
  ) {
    results {
      service_radius: property(name: "service_radius")
    }
  }
}

Gets all Transactables where Propertyservice_radius equals 20. It is exact search, but not case sensitive.

Questions?

We are always happy to help with any questions you may have.