--- title: Facets for search slug: p4ug0578 canonical_url: https://docs.coveo.com/en/p4ug0578/ collection: coveo-for-commerce source_format: adoc --- # Facets for search In the Search manager of the [Coveo Merchandising Hub (CMH)](https://docs.coveo.com/en/o5290573/), merchandisers can configure a [facet collection](https://docs.coveo.com/en/p5890502/) to optimize the filtering experience for visitors on search result pages. [facets](https://docs.coveo.com/en/198/) are dynamic filters that help users narrow down their search results based on specific attributes such as brand, price, category, or other custom product attributes. ![Facet collection displayed for a search| Coveo](https://docs.coveo.com/en/assets/images/coveo-for-commerce/images/cmh/facets-in-search.png) With this tool, merchandisers can configure the **Default facet collection**, which applies to all [queries](https://docs.coveo.com/en/231/) sent from a given [property](https://docs.coveo.com/en/p4ue0547/). This default facet collection will be used for all search result pages, regardless of the specific query or context. Facets in a [facet collection](https://docs.coveo.com/en/p5890502/) can be configured to be either _manually pinned_ or _selected by relevance_: * **Manually pinned facets** are manually selected by the merchandiser and will always appear in the facet collection. They will always appear at the top of the facet list, regardless of the visitor's query. This lets you ensure that certain facets are always visible and easily accessible to visitors. See [Manually pinned facets](https://docs.coveo.com/en/p3oa0420#manually-pinned-facets) for more information. * **Facets selected by relevance** are dynamically determined by Coveo based on the visitor's query. Merchandisers can decide how many of these to display in the facet collection. See [Facets selected by relevance](https://docs.coveo.com/en/p3oa0420#facets-selected-by-relevance) for more information. **Example** A merchandiser managing an outdoor gear site wants to improve its facet selection. To help visitors easily refine their search results, the merchandiser creates a facet collection in the CMH and manually pins the `Brand`, `Size`, and `Price` facets, ensuring that these always appear at the top of the facet list. To further optimize the shopping experience, the merchandiser activates the **Facets selected by relevance** feature and sets the number of dynamically selected facets to `2`. These facets will be added alongside the manually pinned ones. In total, `5` facets will appear on any search result pages. When a visitor the visitor's query, Coveo automatically determines which additional facets to display and the order in which they appear. In this case, the most relevant facets are `Waterproofing` and `Volume`. These are added to the manually pinned facets, resulting in the following facet list: * `Brand` * `Size` * `Price` * `Waterproofing` * `Volume` ## Prerequisites To successfully use this feature, your [Coveo organization](https://docs.coveo.com/en/185/) must: * Have the **Facet** or **Multi-value facet** option enabled on the [**Fields**](https://platform.cloud.coveo.com/admin/#/orgid/content/fields/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/fields/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/fields/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/fields/)) page for every field intended to be used as a facet. For a facet to be used as a relevance-based facet, the following options must also be selected: ** The **Facet Generator** option. ** The **Search operator** option. Activating this option requires that the source be rebuilt in order for the changes to take effect. * Have a compatible version of Headless. We recommend version 3.24.1 or later. ## Create a facet collection To create a [facet collection](https://docs.coveo.com/en/p5890502/) from within the **Search** manager: . From the navigation tabs, select **Facets**. . Click **Create facet collection**. . Select the [facet fields](https://docs.coveo.com/en/p9pn0467/) that you want to pin and click **Add selected**. You can pin up to 30 facet fields. These facet fields will always be pinned on top of the facet section. See [manually pinned facets](https://docs.coveo.com/en/p3oa0420#manually-pinned-facets) for more information. . Once all the facets you want to pin are selected, click **Next: order and settings**. . On the **Facets order and settings** page, you can: ** Set the order of pinned facets. This determines the order in which pinned facets should appear in the facet section. ** Enable the **Facets selected by relevance** option. This lets you define dynamic spots that will be filled by Coveo with the most relevant facets based on the visitor's query. See [Facets selected by relevance](https://docs.coveo.com/en/p3oa0420#facets-selected-by-relevance) for more information. ** Click **Modify** next to a pinned facet to edit its settings. > **Important** > > When a facet field's settings are modified, the changes are applied throughout the selected [property](https://docs.coveo.com/en/p4ue0547/). *** On the **Facet** tab of the editor: **** Under **Displayed name**, enter the facet title as it should be displayed to visitors for each available language. **** From the **Facet type** dropdown menu, you can update the default [facet type](https://docs.coveo.com/en/p3oa0420#facet-types) (if applicable). **** Under **Selection options**, choose whether the facet should be a single or multi-select facet. **** Under **Facet default state**, choose whether the facet values for this facet should be open or closed by default. *** On the **Values** tab of the editor: **** Under **Values sorting**, choose the type of [value sorting](https://docs.coveo.com/en/p3oa0420#facet-values-sorting-methods) that should be applied to the facet values. **** Under **Number of values shown**, enter the number of values displayed before a visitor needs to select **Show more** on the facet to see more values. The default is `100`, and the maximum is `1000` facet values. . Click **Publish now**. ## Modify a facet collection To edit an existing [facet collection](https://docs.coveo.com/en/p5890502/) from within the **Search** manager: . From the navigation tabs, select **Facets**. . Locate the facet collection that you want to modify, and then click **Modify** > **Edit collection**. . Proceed to edit the facet collection as indicated in the [**Create a facet collection** section](#create-a-facet-collection). ## Delete a facet collection To delete an existing [facet collection](https://docs.coveo.com/en/p5890502/) from within the **Search** manager: . From the navigation tabs, select **Facets**. . Locate the facet collection that you want to delete, and then click **Modify** > **Delete**.