Filter rules for search
Filter rules for search
In the Coveo Merchandising Hub (CMH), merchandisers can define filter rules to control the products that are displayed in a search results page.
Filter rules allow merchandisers to define conditions that products must meet to be included or excluded from a query’s result set. For example, a merchandiser could create a filter rule to hide all products that are out of stock from the search results.
Filter rules can apply to all queries or to specific queries only.
![Filter rules | Coveo](/en/assets/images/coveo-for-commerce/images/cmh/CMH-filters.png)
Use case examples
Filter rules can be used to address a variety of use cases. Here are a few examples:
-
Hide out-of-stock products: Hide products that are out of stock from the search results.
-
Show specific products: Ensure that specific products are always displayed when a certain query is performed. For example, you could create a rule that will ensure products from a specific brand are included when the brand name is searched.
-
Hide specific products: Hide specific products from the search results when a certain query is performed. For example, you could create a rule that will hide all products from a specific category when an unrelated category is searched.
Prerequisites
To create rules, merchandisers must ensure they have properly configured their query pipeline and chosen the correct tracking ID to ensure that their changes impact the intended queries.