Resources
Configuring Faceting
Faceted search is a way of classifying records, allowing users to narrow down results. You can think of facets as filterable categories.
- Go to the Index page in the Algolia dashboard
- Select the index which you want to configure
- Go to Configuration
- In the Filtering and Faceting section, select Facets
- In the Attributes for faceting section, select Add an Attribute to add an attribute you want to use as a facet
- Add note here: Note Before you can declare attributes as facets in the dashboard, your engineering team needs to configure them.
- Set each facet attribute as:
- Searchable: if you want to be able to search for facet values
- Filter only: if you only want to use this facet for filtering (and not faceting). See Difference between filtering and faceting for more information
- Not searchable: declares an attribute as facet
- Review and save the changes
- Review and save the changes
- In the Attributes for faceting section, select Sort facet values by and choose between:
- count—facet values are sorted by decreasing numbers of records with this facet value for a given query
- alpha—facet values are sorted in alphabetical order
Note
The sort facet values by setting controls the order in which facet values are retrieved within each faceted attribute. This setting doesn’t impact how facet values are displayed in the user interface.
If you have many facet values, you can adjust these settings in the Attributes for faceting section.
- Max values per facet—By default, you can retrieve 100 values per facet. You can increase this limit up to 1,000.
- Max facet hits—By default, you can retrieve 10 facet values at a time. You can increase this limit up to 100.
To merchandise facet values, for example, specific brands or categories, you can define the ordering of the facets and facet values in the UI from the dashboard.