To learn more about the difference between filters and facets, read our blog post.
Filters allow users to filter search results based on a condition.
You can use filters in a few ways:
- Static filters which allow end-users to filter content after entering a search query.
- Dynamic filters (also referred to as facets), which are generated based on the values of the search result set.
- Filter results using filter expressions. In this case, the end-users will always see the filtered results.
1. Static filters
As an example use case, you can provide users with preset tab filters to filter different domains (blog, news, docs). Another example use case is to create filters to allow users to based on rating (1-5 stars).
2. Dynamic filters
Dynamic filters (also referred to as facets) are generated based on the values of the search result set. Learn more about dynamic filters (or facets).
You can also allow users to select multiple options in the search UI for both static and dynamic filters. A typical use-case of multiple fields is an e-commerce store, where a user enters a search term, select multiple brands, and then filter price range. View the React SDK documentation to set up multi-select facets or filters.