Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can Algolia be configured to treat an ampersand as literal character?

Tags:

algolia

By default, Algolia doesn't recognize ampersands as characters. For example: "K&N", "AT&T", or "PG&E" will match in search but the ampersand is not bolded (false negative), and results include those without ampersands (false positives).

You can see this behavior here: https://demo.algolia.com/instant-search-demo/?q=at%26t

like image 758
jbryanscott Avatar asked Feb 05 '23 09:02

jbryanscott


1 Answers

Algolia web dashboard -> Indices -> Ranking -> Optional Words & Separators -> Separator characters to index:

Add the ampersand (&) to this field and hit Save.

like image 143
jbryanscott Avatar answered Apr 28 '23 08:04

jbryanscott