cht-core icon indicating copy to clipboard operation
cht-core copied to clipboard

Searching without diacritics on pouch does not include contacts etc. _with_ diacritics in name

Open alxndrsn opened this issue 8 years ago • 4 comments

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

alxndrsn avatar Jun 07 '17 16:06 alxndrsn

This is already working with #3392 image

estellecomment avatar Jun 08 '17 10:06 estellecomment

But it doesn't work on pouch! image

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":[]}]

estellecomment avatar Jun 08 '17 10:06 estellecomment

Dupe of https://github.com/medic/medic-webapp/issues/1474

garethbowen avatar Jun 08 '17 10:06 garethbowen

Hi @rmhowe,

This ticket has not been touched in 90 days. Is it still relevant?

(See triaging old issues for more detail)

medic-bot avatar Feb 21 '18 11:02 medic-bot