Optional
enabledIf facet is disabled, it won't be calculated. Used to disable facets created in dashboard
Optional
fieldField on which facet will be calculated
Facet ID
Optional
infixAdds a infix filter on facet's terms. Only applies if type is terms
. Cannot be combined with prefix
Optional
nameThis name is returned with search response. Used as a display name in frontend
Optional
orderReturned facet order. Only applies if type is terms
Optional
positionReturned facet position in search response facets array
Optional
prefixAdds a prefix filter on facet's terms. Only applies if type is terms
. Cannot be combined with infix
Optional
sizeHow many facet terms to return. Only applies if type is terms
Optional
typeFacet type
Add custom facets that are not configured in dashboard.
There are 2 types of facets -
stats
andterms
Terms facet is used to get all values for a field with their counts. Example - get all available colors
Stats facet is used to calculate min and max values for a numeric field. Example - calculate price range of products