Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ntamvl/d323445cbf4677109f4aae135776e0c6 to your computer and use it in GitHub Desktop.
Save ntamvl/d323445cbf4677109f4aae135776e0c6 to your computer and use it in GitHub Desktop.
ElasticSearch - Result window is too large, from + size must be less than or equal to: [10000]

Result window is too large, from + size must be less than or equal to: [10000] but was [1000000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter

I suppose the proper fix would be to modify the code to use the scroll API, but for a quick fix, you can use the following:

curl -XPUT http://localhost:9200/doraana/_settings -d '{ "index" : { "max_result_window" : 1000000 } }'

Use kibana

With Elastic server: http://localhost:9200/doraana, with index: doraana

PUT _settings
{
  "index": {
    "max_result_window": 1000000
  }
}

Use kibana for ElasticSearch 5

PUT doraana/_settings
{
  "index": {
    "max_result_window": 1000000
  }
}

Reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.htm

@aleksandrosadchiy
Copy link

Looks like a fix in v5 elastic/elasticsearch#18237 ?

@nnhansg
Copy link

nnhansg commented Dec 1, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment