Using facets

In this article

A facet is a search interface component that allows the end user to refine a query by selecting result filters based on item metadata (that is, field values). The search results that don’t match the end user’s selection disappear from the result list. Facet content is updated every time the end user interacts with other facets or the search box.

The Coveo Atomic library also allows you to automatically reorder facets and facet values based on usage analytics data representing past end-user interactions with a search interface (see Deploy Dynamic Navigation Experience (DNE)).

Search-Facets
Note

If your search interface window is narrow, such as when it’s embedded within a webpage or accessed on a mobile device, you must click the Sort & Filter option to access the facets. These facets are displayed within the panel that opens, located under Filters.

Searching a Facet Value

There are various types of facet components in Atomic, with atomic-facet being the most commonly used.

However, several other facet components are available, each designed for specific use cases. For more information, consult the reference documentation.

Facet features

Parts of a Facet
  1. The Resource type facet shows a list of the type of resources that your search page contains.

  2. Click the arrow to hide facet values and reduce the size of the facet.

  3. Click Clear 2 filters to remove the selected values from all the facets.

  4. With the Product Documentation and Glossary Entry values selected, the search results only show the types of files that match the selected values.

  5. The number within parentheses shows the number of items corresponding to each Resource type.

  6. Select Show more to display the full list of sources the search page uses.

Notes
  • There are several facet components, some of which look different from those visible in the previous figure.

  • When selecting facet values, their order within the facet won’t change until a new query is triggered by an action on a different component (for example, selecting a value from a different facet or interacting with a breadcrumb). The new query prompts the facet values to be reordered, pushing the selected facet to the top of the facet list.

Selecting several values

To refine your search, you can select more than one value in a facet and you can select values in more than one facet. Each value selected is a filter applying on top of your other selections. The search results are updated to reflect your selections. They consist of items that contain at least one of the selected values from the facets. This is showed in the context of two facets in the following example:

Example

The following facets allow you to filter search results by developer tool and resource type.

Search-FacetsExample

When you select Atomic, CLI, and Product Documentation, the displayed search results are resources in Product Documentation for Atomic or CLI.

Deselecting values

Above the search results, the selected facet values can be displayed as an atomic-breadbox component. Click X next to a value to delete this filter, or click Clear to clear all filters and display the original, complete list of results matching your query.

Example

This search interface shows all results Coveo Platform documentation for either Atomic or CLI.

Search-FacetTag

Searching for values

Facet values are conventionally presented in descending order of relevance based on corresponding search results. However, you can also use the facet search box to pinpoint specific, less common field values. If you’re looking for a specific value, click Search and type it in the search box. You can then select this value.

Searching a Facet Value