r[ae]ym
ProjectionsSchemaField

@facetedSearch

Use the @facetedSearch to enable faceted search on a field.

This directive requires the @searchable directive to be enabled on the projection. @searchable

Example

user.graphql
type User @upsertOn(...) @searchable {
    name: String!
	age: Int! @facetedSearch
}

In this case, the age field will be available for faceted search via typesense.

user.graphql
type User @upsertOn(...) @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.

On this page