Accent insensitive search on CategorySearch
Hello, I am using reactive search in a web application, which supports languages with diacritics and accents.
However there are cases where database values contain EUR characters but you wish to search using Non-EUR characters. E.g. Database has "Gräsö" and you wish this to be found only by typing "Graso".
Would it be possible to add support for accent ignore? In the language that I am using, a possible solution would be to add fuzziness, however fuzziness is not supported when using queryFormat="and" option, which is needed in order to get preferred results.
I managed to solve my issue partly using the following customQuery. I will leave the issue open, since this suggestion will not work for languages using more than one accent in their words, and is only a work-around.
customQuery = {(searchText) => {
if (!searchText) {
return {}
}
return {
"query": {
"bool": {
"should": [
{
"match_phrase_prefix": {
"field_name": searchText
}
},
{
"fuzzy": {
"field_name": searchText
}
}
],
"minimum_should_match": "0"
}
}
}
}