How to Add and Remove Synonyms | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • How to add synonyms to a Search experience
  • How to remove snyonyms from a Search experience

How to add synonyms

Synonyms can easily be added to or removed from the Search Configuration UI or JSON editor.

Add Synonyms with the UI

You can set synonyms in the UI by navigating to “Synonyms” within the configuration UI. Simply input your choices into the respective One Way Synonyms, Synonym Sets, or Normalization Synonyms section:

synonyms UI

Add Synonyms with the JSON editor

To add a synonym in the JSON editor, simply navigate to the object “Synonyms” in the configuration. Note that One way synonyms, normalization synonyms, and Synonym Sets are defined separately and differently. See below for syntax:

{
  "synonyms": {
    "oneWay": [
      {
        "phrase": "careers",
        "synonyms": [
          "job"
        ]
      }
    ],
    "synonymSet": [
      [
        "Case study",
        "Customer showcase",
        "Customer success story"
      ]
    ],
    "normalization": [
      {
        "from": [
          "nurse",
          "physician"
        ],
        "to": "doctor"
      }
    ]
  }
}

Fun fact - within one way synonyms you can actually define multiple synonyms for one phrase. A helpful indicator of this functionality is the brackets used in this section - which indicate an array of comma separated values can be supported. For example:

{
  "synonyms": { 
    "oneWay": [
      {
        "phrase": "careers",
        "synonyms": [
          "job",
          "position"
        ]
      }
    ],
  }
}

In this example, searches for “careers” will also bring up results related to “job” or “postiion.”

Normalization Synonyms are similar as you can also specify multiple terms using comma serperated values to be mapped to a single term.

{
  "synonyms": { 
    "normalization": [
      {
        "from": [
          "nurse",
          "physician"
        ],
        "to": "doctor"
      }
    ]
  }
}

To remove a synonym you can simply just delete it from the configuration.

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 2

    True or False: One-way synonyms and Synonym sets are defined exactly the same way in the Search Config JSON.

    Error Success Question 2 of 2

    Where do you go to add a one-way synonym to your Search experience

    A Hitchhiker in the making! 🔥

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Feedback