Nested sorting not working as expected ElasticSearch Nested sorting not working as expected ElasticSearch elasticsearch elasticsearch

Nested sorting not working as expected ElasticSearch


So, the problem was with case sensitive data. https://www.elastic.co/guide/en/elasticsearch/reference/current/normalizer.html fixed my issue.

"settings": {    "analysis": {      "normalizer": {        "my_normalizer": {          "type": "custom",          "char_filter": [],          "filter": ["lowercase", "asciifolding"]        }      }    }  }

Now we can use this normalizer with our keyword field type:

field :field_name, type: 'keyword', normalizer: 'my_normalizer'

Hope this was helpful.