0

Hey I have the following index in Elastic Search :

 "properties": {
      "Type": { "type": "keyword" },
      "Name": {
        "type": "text",
        "copy_to": "RawData",
        "fields": {
          "raw": {
            "type": "keyword",
            "normalizer": "case_insensitive"
          }
        },
        "analyzer": "rawdata_index_analyzer",
        "search_analyzer": "search_analyzer"
      },
      "PostalCode": {
        "type": "text",
        "copy_to": "RawData",
        "fields": {
          "raw": {
            "type": "keyword"
          }
        },
        "analyzer": "rawdata_index_analyzer",
        "search_analyzer": "search_analyzer"
      },
      "Volume": {
        "type": "text",
        "copy_to": "RawData",
        "fields": {
          "raw": {
            "type": "keyword",
            "normalizer": "case_insensitive"
          }
        },
        "analyzer": "rawdata_index_analyzer",
        "search_analyzer": "search_analyzer"
      }
}

I am sorting using the Volume field and I am not providing any secondary sort. So two documents in the index with the same Volume field will be sorted in which order? and based on which field?

And also I am querying at the same time with keyword that matches Name field so how does this work with the primary sort and followed by not providing any secondary sort.

Basically How does Sort collision handling occurs in ES and which document gets more preference in that time?

Paulo
  • 8,690
  • 5
  • 20
  • 34

0 Answers0