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

To learn how to use synonym detection in the Rules Editor, see Use Query Rewrites in the Rules Editor.

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.