How to Add and Remove Synonyms| Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- How to add synonyms to an Answers experience
- How to remove snyonyms from an Answers 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 or Synonym Sets section:
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 are defined separately and differently than Synonym Sets. See below for syntax:
{
"synonyms": {
"oneWay": [
{
"phrase": "careers",
"synonyms": [
"job"
]
}
],
"synonymSet": [
[
"Case study",
"Customer showcase",
"Customer success story"
]
]
}
}
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.”
To remove a synonym you can simply just delete it from the configuration.