OptionalenabledIf facet is disabled, it won't be calculated. Used to disable facets created in dashboard
OptionalfieldField on which facet will be calculated
Facet ID
OptionalinfixAdds a infix filter on facet's terms. Only applies if type is terms. Cannot be combined with prefix
OptionalnameThis name is returned with search response. Used as a display name in frontend
OptionalorderReturned facet order. Only applies if type is terms
OptionalpositionReturned facet position in search response facets array
OptionalprefixAdds a prefix filter on facet's terms. Only applies if type is terms. Cannot be combined with infix
OptionalsizeHow many facet terms to return. Only applies if type is terms
OptionaltypeFacet type
Add custom facets that are not configured in dashboard.
There are 2 types of facets -
statsandtermsTerms 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