The /facet-search route allows you to search for facet values.
/facet-search
route allows you to search for facet values. Facet search supports prefix search and typo tolerance. The returned hits are sorted lexicographically in ascending order.
float64
. This means they lack precision and can be represented in different ways, making it difficult to search facet values effectively.filterableAttributes
list. Learn more about facets in our dedicated guide.facetQuery
.For example, searching for Jane
will return Jane Austen
, but searching for Austen
will not return Jane Austen
.Name | Type | Default value | Description |
---|---|---|---|
facetName * | String | null | Facet name to search values on |
facetQuery | String | null | Search query for a given facet value. If facetQuery isn’t specified, Meilisearch returns all facet values for the searched facet, limited to 100 |
q | String | "" | Query string |
filter | String* | null | Filter queries by an attribute’s value |
matchingStrategy | String | "last" | Strategy used to match query terms within documents |
attributesToSearchOn | Array of strings | null | Restrict search to the specified attributes |
exhaustiveFacetCount | Boolean | false | Return an exhaustive count of facets, up to the limit defined by maxTotalHits |
Name | Type | Description |
---|---|---|
facetHits.value | String | Facet value matching the facetQuery |
facetHits.count | Integer | Number of documents with a facet value matching value |
facetQuery | String | The original facetQuery |
processingTimeMs | Number | Processing time of the query |
200 Ok