Elasticsearch uses wrong Case Folding for Unicode Characters Elasticsearch uses wrong Case Folding for Unicode Characters elasticsearch elasticsearch

Elasticsearch uses wrong Case Folding for Unicode Characters


You should try to use the Turkish Language Analyzer in your setting.

{  "mappings": {    "names": {      "properties": {        "name": {          "type":     "string",          "analyzer": "turkish"         }      }    }  }}

As you can see in the implementation details, it also defines a turkish_lowercase so I guess it'll take care of your problems for you. If you don't want all the other features of the Turkish Analyzer, define a custom one with only turkish_lowercase

If you need a full text search on your name field, you should also change the query method to match query, which is the basic full text search method on a single field.

{  "query": {    "match": {      "name": "bahadır"    }  }}

On the other hand, query string query is more complex and searches on multiple fields allowing an advanced syntax; It also has an option to pass the analyzer you want to use, so if you really needed this kind of query you should have tried passing "analyzer": "turkish" within the query. I'm not an expert of query string query though.