Search with asciifolding and UTF-8 characters in Elasticsearch

Viewed 3594

I am indexing all the names on a web page with characters with accents like "José". I want to be able to search the this name with "Jose" and "José".

How should I set up my index mapping and analyzer(s) for a simple index with one field "name"?

I set up an analyzer for the name field like this:

"analyzer": {
  "folding": {
    "tokenizer": "standard",
    "filter": ["lowercase", "asciifolding"]
   }
 }

But it folds all accents into ASCII equivalents and ignores the accent when indexing the "é". I want the "é" char to be in the index and I want to be able to search "José" with either "José" or "Jose".

2 Answers
Related