For a facet attribute to be searchable, it must have been declared in the attributesForFaceting
index setting using the searchable()
modifier.
If this has been done, but you still can't search for facet values with certain separators in them, then the solution is to add the specific separator to the separatorsToIndex parameter.
searchForFacetValues does not work in the same way as the standard search method. Facet queries only match prefixes, typos, and exact. There is also a known limitation when certain separators are present in a facet value. For example A.B.
will not be found in a searchForFacet values unless .
is added to the separatorsToIndex parameter. More on this can be found in our documentation below:
- https://www.algolia.com/doc/api-reference/api-parameters/separatorsToIndex/
- https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/#method-param-facetquery
Frequently used separators include these characters: .!#()[]{}*+-_一,:;<>?@/\^|%&~£¥$§€`"'‘’“”†‡