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 with 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
laptopwith the synonymsnotebookandportable 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 any of the term
laptop,notebook, orportable computer. Note that in this example, if the termnotebookis searched, the search results won’t include items that contain the termslaptoporportable 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 computerwith 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 any of the terms
laptop,notebook, orportable computer. The difference with a one-way synonym rule is that if the termnotebookorportable computeris 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
laptopwith 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
phonemay not return many results, but by associating it with synonyms likesmartphoneandmobile, 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 termkayakto their query, promoting Barca Sports kayaks in the search results.
Prerequisites
Before you create rules in the Coveo Merchandising Hub (CMH):
-
In the Coveo Administration Console, map the metadata that you want to use as attributes in rules to the corresponding fields. These fields must have the Facet or Multi-value facet option enabled. For example, to use the
colormetadata as an attribute in a rule, map it to a field with the Facet or Multi-value facet option enabled. -
Choose the correct property to ensure that your changes affect the intended queries.
Create synonym rules
To create synonym rules
-
In the CMH, access the Search manager.
-
From the navigation tabs, select synonym rules and then click Create synonym rule.
-
Under This rule will apply to, define the scope of the rule.
-
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.
-
Review your rule configuration.
Leading practicesUse the panel on the right to preview how the rule affects the search results for a given locale.
The preview is an approximate simulation that won’t cover every scenario encountered in a live environment.
-
Click Publish now.
The rule now applies.
Modify synonym rules
To modify synonym rules
-
In the CMH, access the Search manager.
-
From the navigation tabs, select Synonym rules.
-
Locate the rule that you want to modify.
-
Click
, then click Modify.
-
You can modify the synonym terms. These are the same fields covered in the rule creation section.
You can’t change the scope or type of a synonym rule after its creation.
-
When you’ve finished editing the rule, click Next.
-
Click Publish now.
The modified rule now applies.
Delete synonym rules
To delete synonym rules
-
In the CMH, access the Search manager.
-
From the navigation tabs, select synonym rules.
-
Locate the rule that you want to delete.
-
Click
, and then click Delete.
-
Click Delete again to confirm.
The rule is deleted.