Index and search accented text

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 tried this:

PUT foo
{
  "settings": {
        "analysis": {
            "analyzer": {
                "folding": {
                    "tokenizer": "standard",
                    "filter": ["lowercase", "asciifolding"]
                }
            }
        }
    },
    "mappings" : {
        "user" : {
            "properties" : {
                "name" : { "type" : "text" }
            }
        }
    }
}

PUT foo/user/1
{
    "name" : "José Sebastián"
}

PUT foo/user/2
{
    "name" : "Jose Rondon"
}

GET /foo/_search?q=name:jose
GET /foo/_search?q=name:josé

When I search with "jose" or "josé", I want both of them returned.

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.