Special characters in synonyms


I have created to synonyms to my index.
1: [‘½’, ‘1/2’]
2: [’"’, ‘inch’]

(just to be clear… i just fill in the synonyms field with ½,1/2 and not the ’ and array brackets :slight_smile: )

If I search valve gate 1-½" and valve gate 1-1/2" i get the same result. But if I replace the " with the word inch, I get no results at all (which properly just mean another result, and the synonym doesn’t work).

Is there a possibility that characters like " should be escaped in some way?

Hi Peter,

Your synonym with inch doesn’t work because the character " isn’t indexed by default. To make it work, you just need to add " in the separatorsToIndex https://www.algolia.com/doc/api-reference/api-parameters/separatorsToIndex/.

Thanks for your question, let us know if you have more questions.

Best regards

1 Like

Thanks. That did the trick :smiley: