cht-core
cht-core copied to clipboard
Searching without diacritics on pouch does not include contacts etc. _with_ diacritics in name
If I have a contact named Sánchez, I'd expect him to show if I searched for Sanchez.
Possible starting point: https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript#answer-18391901
Related: https://github.com/medic/medic-webapp/issues/3392
This is already working with #3392

But it doesn't work on pouch!

Request :
{"startkey":["eleve"],"endkey":["eleve"]}
http://localhost:5988/medic/_design/medic-client/_view/contacts_by_freetext?startkey=%5B%22eleve%22%5D&endkey=%5B%22eleve%EF%BF%B0%22%5D
Response on couch :
{"total_rows":123,"offset":52,"rows":[
{"id":"3f2af8cb-afa5-4b5b-b223-5cdaeb9790e8","key":["élève"],"value":"3 élève "},
{"id":"977d9c05-e9c8-45f1-802d-d43ab52870d9","key":["élève"],"value":"3 élève बुद्ध"}
]}
Response on pouch:
[{"total_rows":18,"offset":0,"rows":[]}]
Dupe of https://github.com/medic/medic-webapp/issues/1474
Hi @rmhowe,
This ticket has not been touched in 90 days. Is it still relevant?
(See triaging old issues for more detail)