Notes on how to change and verify index.max_result_window in Amazon Elasticsearch Service. Changes to this setting require attention to cluster latency and memory.
Index modules | Elasticsearch Reference [7.8] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html
index.max_result_windowThe maximum value of
from + sizefor searches to this index. Defaults to10000. Search requests take heap memory and time proportional tofrom + sizeand this limits that memory. See Scroll or Search After for a more efficient alternative to raising this.
Change
curl -H "Content-Type: application/json" -XPUT 'https://vpc-xxx-xxxx.ap-northeast-1.es.amazonaws.com/xxxx/_settings' -d '
{
"index": {
"max_result_window" : "1000000"
}
}'
Verify
curl -X GET "https://vpc-xxx-xxx.ap-northeast-1.es.amazonaws.com/xxxx/_settings?pretty"
Results
[ec2-user@bastin ~]$ curl -H "Content-Type: application/json" -XPUT 'https://vpc-xxx-xxxxx.ap-northeast-1.es.amazonaws.com/xxxxx/_settings' -d '
> {
> "index": {
> "max_result_window" : "1000000"
> }
> }'
[ec2-user@bastin ~]$ curl -X GET "https://vpc-xx-xx.ap-northeast-1.es.amazonaws.com/xxxxx/_settings?pretty"
{
"amazon_neptune" : {
"settings" : {
"index" : {
"number_of_shards" : "1",
"provided_name" : "xxxxx",
"max_result_window" : "1000000",
"creation_date" : "1595601039642",
"number_of_replicas" : "1",
"uuid" : "05kXhekxQ5KUfqyI4_nABw",
"version" : {
"created" : "7040299"
}
}
}
}