If several words have the same meaning in your data set, you can create a list of synonyms. This will make your search results more relevant.

In general, a search on one word will give the same results as a search on one of its synonyms.

There is one exception to this rule, more on this below.

Adding synonyms

To add synonyms, go to settings in the app. Then click on the 'synonyms' tab. The screen below will appear.

afosto.app__t=4607585555578880(Macbook Screenshot) (3).png

Click on add synonym. The pop-up below will appear, allowing you to add a synonym.

afosto.app__t=4607585555578880(Macbook Screenshot) (6).png

There are two types of synonyms you can enter in Instant Search. They are:

  • One way synonym
  • Two-way synonym

One-way synonym

Use this if you want a word to be synonymous with another, but not the other way around.

phone => iphone

A search for phone will return documents that contain iphone as if they contained the word phone. However, if you search for iphone, documents that contain phone will be lower in the results because no match can be found.

Two-way synonym

By associating one or more synonyms with each other, they are considered the same in both directions.

shoe <=> boot <=> slipper <=> trainers

If one searches with one of these words, all synonyms are considered the same and appear in the search results.

If you search for shoe, boot is found, and if you search for slipper, shoe is found. In the example in the screenshot, we have made "Shawshank redemption" synonymous with "Best movie" and vice versa.

Once you have entered your synonym, click on add.

afosto.app__t=4607585555578880(Macbook Screenshot) (5).png

See screenshot below. If you search for 'Best movie', the film 'The shawshank redemption' will appear as the first result. This is the synonym we added above.

afosto.app_instant-search_view_movies_t=5719193282412544(Macbook Screenshot) (2).png

Synonyms with several words

Note that synonyms with more than two words are treated differently than synonyms between single words.

If a multi-word phrase is considered a synonym of another word or phrase, the exact search always takes precedence over its synonym(s). If you enter "SF" as a search term, 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 that for "The Lord of the Rings" and "LOTR".

Normalisation of words

All synonyms are lowercased and de-unicoded during indexing.

A search for "resume" would return all documents containing "resume" or "CV" in addition to all documents containing "Résumé", "resumé", "cv", etc., not altered by capitalization or accent marks.