Faceted search interfaces provide users with a quick way to narrow down search results by selecting categories relevant to their query.
genres
, language
, and rating
to the list of filterableAttributes
:
facets
search parameter:
facetDistribution
and facetStats
:
facetDistribution
lists all facets present in your search results, along with the number of documents returned for each facet.
facetStats
contains the highest and lowest values for all facets containing numeric values.
sortFacetValuesBy
property of the faceting
index settings:
genres
facet by descending value count.
Repeating the previous query using the new settings will result in a different order in facetsDistribution
:
genres
facet for values starting with c
:
The response contains a facetHits
array listing all matching facets, together with the total number of documents that include that facet:
q
, filter
, and matchingStrategy
parameters. Learn more about them in the API reference.