Max_result_window value not reflect in result set.. it show only 10k records only

Hello ,

i have set property of max_result_window : "1000000" in settings at index level but while search result for larger data set then only result 10k so it mean not taking effect index setting.

is there anything i have to do ?

i have installed latest version of ES 7.6 in Kubernates pod.

help me out here..

Thanks,
Sanjay Patel

Welcome!

What exact command did you launch?
What is the search request you are running?

Hello Donoonet,

here is my index settings

"settings": {
"index": {
"number_of_shards": "5",
"provided_name": "GoodNew1",
"max_result_window": "1000000",
"creation_date": "1585221664680",
"number_of_replicas": "1",
"uuid": "-VgZQKp1RUWWNMhQYLbm7Q",
"version": {
"created": "5050299"
}
}

and my search query like

POST GoodNew/_search
{
"query": {
"bool": {
"filter": {
"bool": {

      "must_not": [
        {
          "match": {
            "IsApproved": true
          }
        },
        {
          "match": {
            "isArchive": true
          }
        }
      ]
      
              }
  }
}

},
"size": 50000
}

and result i get like

{
"took" : 12,
"timed_out" : false,
"_shards" : {
"total" : 3,
"successful" : 3,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score" : 0.0,
"hits" : [....
]
}

I guess you are wondering about:

"value" : 10000,

That's the default behavior, whatever the size or the window are.

You want to look at: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-track-total-hits