Explained: Instant Search Synonyms
If multiple words have the same meaning in your data collection, you can create a list of synonyms. This makes your search results more relevant.
In general, a search on a word returns the same results as a search on one of its synonyms.
There is one exception to this rule, which is explained below.
To add synonyms, you need to go to the settings in the app. Then click on the 'synonyms' tab. The following screen will appear.
Click on 'add synonym'. The following pop-up appears, allowing you to add a synonym.
There are two types of synonyms you can enter in Instant Search. These are:
- One-way synonym
- Two-way synonym
Use this if you want one word to be synonymous with another, but not the other way around.
phone => iPhone
A search for 'phone' will return documents containing 'iPhone' as if they contain the word 'phone'. However, if you search for 'iPhone', documents containing 'phone' will appear lower in the results because no match can be detected.
By associating one or more synonyms with each other, they are considered the same in both directions.
shoe <=> boot <=> slipper <=> sneakers
When searching with one of these words, all synonyms are considered the same word and appear in the search results.
If you search for 'shoe', you'll find 'boot', and if you search for 'boot', you'll also find 'shoe'. In the example in the screenshot, we made 'Shawshank Redemption' synonymous with 'Best movie' and vice versa.
Once you've entered your synonym, click 'add'.
See the screenshot below. When searching for 'Best movie', the film 'The Shawshank Redemption' appears as the top result. This is the synonym we added above.
Synonyms with multiple words
Note that synonyms with more than two words are treated differently than synonyms between individual words.
If a multi-word phrase is considered synonymous with another word or phrase, the exact search query always takes precedence over its synonym(s). If you enter "SF" as a search query, results containing "San Francisco" will also be returned. However, they will be considered less relevant than those containing "SF". The reverse is also true.
Multi-word synonyms are limited to a maximum of three words. For example, while you could make "League of Legends" and "LOL" synonyms, you cannot do so for "The Lord of the Rings" and "LOTR".
All synonyms are lowercased and de-unicoded during indexing.
A search for "cv" would return all documents containing "cv" or "CV", along with all documents containing "Résumé", "resumé", "cv", etc., unaffected by capitalization or accent marks.