CRUDSchemaField
@facetedSearch
Use the @facetedSearch to enable faceted search on a field.
This directive requires the @searchable directive to be enabled on the type.
@searchable
Example
type User @crudType @searchable {
name: String!
age: Int! @facetedSearch
}In this case, the age field will be available for faceted search via typesense.
Example of a Range Faceted Search
type User @crudType @searchable {
name: String!
age: Int! @facetedSearch(range: true)
}In this case, the age field will be available for range faceted search via typesense.
The only difference here is how typesense will create the index used for the faceted search.