How do I create unidirectional/asymmetric synonyms?

Synonyms in the Algolia configuration are symmetrical. This means that we consider NES to be the same as Nintendo Entertainment System and vice-versa.

Sometimes you want this to flow in one-direction. For example, you want video game to be considered the same as NES and you want video game to also be considered the same as Sega, but you do not want Sega to be equivalent with NES.

You can set this up leveraging altCorrections. Specify the base word (for example, "video game") as the word, the alternative as the correction, and the nbTypos as 0 since this isn't a misspelling, it's a unidirectional synonym.

Last updated