Exclude rules for search

This is for:

Merchandiser

In the Search manager of the Coveo Merchandising Hub (CMH), merchandisers can define Exclude filter rules to hide products that match specific criteria from the search results.

Exclude filter rules can apply to all queries or to specific queries only.

Exclude rules | Coveo

Use case examples

Exclude filter rules can be used to address a variety of use cases. Here are a few examples:

  • For a specific query, you want to ensure that products from a specific category or with specific attributes are excluded from the search results. For example, when a visitors searches for "Kayak," you want to ensure that products from the canoe category are excluded from the search results.

  • You want to hide products that are out of stock from the search results.

  • When your visitors are searching for a specific brand, you want to hide products from a competitor brand.

Prerequisites

To create rules, merchandisers must make sure that they have chosen the correct tracking ID to ensure that their changes impact intended queries.

Create an include rule

To create a rule:

  1. In the CMH, access the Search manager.

  2. From the navigation tabs, select Filter rules.

  3. Click Create filter rule, and then, Depending on whether you want to apply the exclude rule to a specific query or to all queries, select the appropriate option.

  4. Select the Locale for which the exclude rule will apply. By default, a rule applies to all available locales.

  5. Select the Query to which the exclude rule will apply, and then click Done. Note that if you selected to apply the exclude rule to all queries, you won’t be able to select a query.

  6. Under Choose an action, select Exclude.

  7. Under Attribute, select the attribute on which you want to apply the exclude rule. For example, if you want to exclude products based on the color attribute, select color.

  8. Under Operator, select the operator that you want to use.

  9. Under Value, select the attribute value that you want to use to filter products. For example, if you want to filter products based on the color attribute, enter the color value that you want to use as a filter, such as red. Note that you can select multiple values for the attribute.

  10. (Optional) If you want to add more attribute-value pairs to the exclude rule, click Add attribute and repeat the process.

  11. Click Done.

    Tip
    Leading practice

    You can preview the effect of your rules by using the Preview panel on the right side of the page. You can use this panel to simulate queries and see how the rule affects the search results for a given locale.

  12. Review your rule configuration, and then click Publish.

  13. In the Publish now panel, enter a meaningful name for your rule, and then click Publish. The rule now applies.

Manage existing exclude rules

To manage an existing include rule:

  1. In the CMH, access the Search manager.

  2. From the navigation tabs, select Exclude rules.

  3. Locate the rule you want to manage.

  4. Click Modify. You can now decide to edit the rule or delete it.