Integrating Search

Filtering Content

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:

  1. Filter results using filter expressions. In this case, the end-users will always see the filtered results.
  2. Static filters which allow end-users to filter content after entering a search query.
  3. Dynamic filters (also referred to as facets), which are generated based on the values of the search result set.

1. Filter results using filter expressions

If you are using our Website Search Integration, you can use filter expressions to filter content.

For example, if you are looking to filter out specific sections of a website, you can use filter to remove a specific section (e.g. you can filter out a blog section by using dir1!='blog').

2. Static filters

Static filters can be applied when a user interacts with a UI component (e.g. a tab-filter, radio buttons, or checkboxes). You can set up tab filters easily when you generate a Search Interface in the console.

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).

3. 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 Ecommerce 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.