Synonym Detection

The Synonym Detection feature generates pairs of synonyms and pairs of similar queries. Two words are considered potential synonyms when they are used in a similar context in similar queries. When synonym detection is enabled, a query that contains a matching term is expanded to include all of its synonyms, with the original term boosted by a factor of two.

Synonyms are applied in the Text Tagger stage of the query pipeline.

The Synonym and Similar Queries Detection job automatically creates synonym pairs based on your AI-generated data. When you navigate to Relevance > Query Rewriting > Synonym Detection, you can review or edit the output from the job and manually add new synonym pairs. Your changes remain in the _query_rewrite_staging collection until you publish them.

When you manually add new synonym pairs, subsequent job runs use those documents as input for machine learning to improve the job’s output. Unlike job-generated documents, manually-added query rewriting documents are never overwritten by new job output.

Synonyms screen

Synonym directionality

When you edit or create a synonym pair, you can configure its directionality, either uni-directional or bi-directional.

To toggle between uni-directional and bi-directional, click the Edit icon icon next to the synonym pair, then click the directionality icon:

Directionality toggle

Uni-directional synonyms

Uni-directional synonyms produce query substitutions. That is, when a query term matches a known uni-directional synonym, the original query term is replaced with the synonym.

In the uni-directional example below, "iphone" is a synonym of "phone" but "phone" is not a synonym of "iphone". When "phone" is found in a query, it is replaced with "iphone".

Uni-directional synonyms

When you manually create a new synonym pair, the default is uni-directional.

Bi-directional synonyms

Bi-directional synonyms produce expanded queries. That is, when a query contains a known bi-directional synonym, the query is rewritten to include the original term plus all of its known bi-directional synonyms, resulting in a greater number of potentially relevant results. The original term is also boosted to help preserve the user’s intent.

In the bi-directional example below, "tv" is a synonym of "television" and "television" is a synonym of "tv". If a query contains either "tv" or "television", the query is expanded to include both terms.

Bi-directional synonyms

Job-generated synonyms are always bi-directional unless a reviewer edits them.

Reviewing auto-generated synonym pairs

Synonyms that are automatically generated by the Synonym and Similar Queries Detection job are assigned the following Status value:

  • Pending

    The confidence level is ambiguous, and the result must be reviewed by a user before it can be deployed. It will only be moved from the _query_rewrite_staging collection to the _query_rewrite collection when its status has changed to "Approved" and it has been published.

    By default, all results from synonym job are set to "Pending", since there are usually limited number of synonyms and synonym expansion can have high impact on relevancy. 

    See below for instructions.

How to review a pending synonym pair result
  1. Navigate to Relevance > Query Rewriting > Synonym Detection.

    Notice the Status facet on the left. Click Pending to view only the items that need review.
  1. Click the Edit icon icon next to the synonym pair.

  2. In the Status column, select either "Approved" or "Denied".

    Optionally, you can also edit the synonym pair itself.

    Where alternative synonyms were detected, you can click Suggestions to view and select them as replacements for the displayed synonym pair:


    Although the Confidence field is also editable, changing its value makes no difference.
  3. Click the Close icon next to the updated synonym pair:

    Close a synonym pair

Approving a synonym pair does not automatically deploy it to the _query_rewrite collection. When you have finished your review, you must click Publish to deploy your changes.

Adding new synonym pairs

In addition to the synonym pairs generated by the Synonym and Similar Queries Detection job, you can manually add your own.

How to add a synonym pair
  1. Navigate to Relevance > Query Rewriting > Synonym Detection.

  2. At the bottom of the rules list, click the Add icon icon.

    A new synonym pair appears at the top of the list:

    Add a synonym pair

  3. Enter the query term.

  4. Enter one or more synonym pairs.

    It’s not necessary to set a confidence value.
  5. Select the synonym pair’s status, depending on whether you want to deploy it the next time you publish your changes ("Approved") or save it for further review ("Pending").

  6. Click the check mark to save the new synonym pair:

    Save a synonym pair

Publishing your changes

How to publish updated synonym pairs
  1. In the Synonym Detection screen, click the PUBLISH button.

    Fusion prompts you to confirm that you want to publish your changes.

  2. Click PUBLISH.

You can un-publish a query rewrite by changing its status to "pending" or "denied", then clicking PUBLISH.