Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Synonyms

Describes how to create synonyms in Optimizely Configured Commerce.

Synonyms provide the necessary flexibility to provide variants for search terms on your website. As an example, our website offers several types of bubblers; however, they are not all called bubblers. Some are called water fountains, some are drinking fountains and others are referred to as fountains. The goal is to make sure when a user searches for any of those variants of bubbler, they all are returned in the search results.

The synonym page consists of two fields: Bidirectional and Synonym. In the example above when searching for water fountain, drinking fountain or fountain, the search terms are modified to be "bubbler". This happens for any terms in the index that uses the synonym filter. So, if a customer searches "water", the results will not find "water fountain". However, if you make the synonyms bi-directional, search replaces all synonyms with the whole string of words. "Water fountain" would turn into "water fountain, drinking fountain, fountain, bubbler", so searching "water" would definitely find the right products.

When creating synonyms, it is required that each Synonym relationship be its own record. This can be completed manually, but adding the various relationships into the list or, if the number or relationships is lengthy, it maybe be easier to create the relationships in Excel and then import them into the list.

We will use the bubbler scenario to help provide context for the instructions below. The goal is to make sure when a customer searches for any of those variants of bubbler, they all are returned in the search results.

  1. Go to Admin Console > Marketing > Search > Synonyms.
  2. Click the Add Synonym .
  3. Set the Bidirectional toggle to Yes if this synonym should replace any synonym found with all synonym values. Unidirectional synonyms replace any synonym found with all replacement tokens.
  4. Click the Add Synonym icon to enter your synonyms.

📘

Note

It is necessary to rebuild the Product Search Index after updating Synonyms. Marketing > Search > Indexing. Click the Full Rebuild .

Using the steps above and referring to the provided scenario, the following table illustrates what would need to be included in the Synonyms list to satisfy the scenario:

SynonymSynonymBidirectional
Bubblerwater fountainYes
Bubblerdrinking fountainYes
BubblerfountainYes