Synonym rules for search
Synonym rules for search
In the Coveo Merchandising Hub (CMH), merchandisers can create synonym rules to define the relationships between query terms.
Synonym rules are used to expand the scope of a query by including additional, equivalent, or replacement terms to the original query terms.
For example, a synonym rule can be created to associate the query term rashguard
with the synonyms swimsuit
and wetsuit
.

Synonym rule types
Using the CMH, merchandisers can create three types of synonym rules:
-
One-way synonym: Defines alternative terms for a specific query term, but doesn’t reciprocate the association.
ExampleA one-way synonym rule can be created to associate the query term
laptop
with the synonymsnotebook
andportable computer
. This means that when a user searches forlaptop
, the query will becomelaptop OR notebook OR portable computer
.Therefore, the search results will include products that contain either the term
laptop
,notebook
, orportable computer
. Note that in this example, if the termnotebook
is searched, the search results won’t include items that contain the termslaptop
orportable computer
. -
Two-way synonym: Defines multiple search terms that are considered equivalent, creating a reciprocal relationship between them.
ExampleA two-way synonym rule can be created to associate the query terms
laptop
,notebook
, andportable computer
with each other. This means that when a user searches forlaptop
, the query will becomelaptop OR notebook OR portable computer
.Therefore, the search results will include items that contain either the term
laptop
,notebook
, orportable computer
. The difference with a one-way synonym rule is that if the termnotebook
orportable computer
is searched, the search results will also include products that contain the termlaptop
. -
Replace synonym: Defines a term that should be replaced by another term.
ExampleA replace synonym rule can be created to replace the query term
laptop
with the termnotebook
. This means that when a user searches forlaptop
, the query will becomenotebook
.
Use case examples
Synonym rules can be used to address a variety of use cases. Here are a few examples:
-
Broaden search results: You want to ensure that more products are returned when a user searches for a specific term. For example, a query like
phone
may not return many results, but by associating it with synonyms likesmartphone
andmobile
, you can ensure that more products are displayed. -
Correct common spelling mistakes: Common spelling mistakes can be corrected by replacing them with the correct term. For example, your visitors may often misspell one of your product names, resulting in no or few search results. By creating a synonym rule that replaces the misspelled term with the correct one, you can ensure that the correct products are returned.
-
Promote specific products: You want to promote specific products when a user searches for a particular term. For example, when a user searches for
Barca Sports
, you can add the termkayak
to their query, promoting Barca Sports kayaks in the search results.
Prerequisites
To create rules in the Coveo Merchandising Hub (CMH), you must meet the following prerequisites:
-
In the Coveo Administration Console, the metadata that you want to use as attributes in rules has been mapped to the corresponding fields. These fields must have the Facet or Multi-value facet option enabled. For example, to use the
color
metadata as an attribute in a rule, it must be mapped to a field with the Facet or Multi-value facet option enabled. -
You must choose the correct property to ensure that your changes affect the intended queries.
Create a synonym rule
-
In the CMH, access the Search manager.
-
From the navigation tabs, select filter rules and then click Create filter rule.
-
Under This rule will apply to, define the scope of the rule.
-
Locale: Select the locale for which the synonym rule will apply. By default, a rule applies to all available locales.
-
-
Under Choose an action, select the type of synonym rule that you want to create.
-
Fill in the required fields based on the selected synonym rule type.
-
Click Next.
Leading practicesYou can preview the effect of your rules in the panel on the right side of the page. Use this panel to simulate queries and see how the rule affects the search results for a given locale.
-
Review the rule configuration, and then click Publish now. The rule now applies.
Manage existing synonym rules
-
In the CMH, access the Search manager.
-
From the navigation tabs, select filter rules.
-
Locate the rule you want to manage.
-
Click Modify. You now have to option to modify the rule configuration, modify the publish settings, or delete the rule:
-
To modify the rule configuration, click Rule.
-
To modify the publish settings, click Publish settings.
-
To delete the rule, click Delete.
-