Elasticsearch 2.1: Result window is too large (index.max_result_window)

后端 未结 7 1975
余生分开走
余生分开走 2020-11-28 05:18

We retrieve information from Elasticsearch 2.1 and allow the user to page thru the results. When the user requests a high page number we get the following error message:

7条回答
  •  时光说笑
    2020-11-28 05:42

    If you need deep pagination, one possible solution is to increase the value max_result_window. You can use curl to do this from your shell command line:

    curl -XPUT "http://localhost:9200/my_index/_settings" -H 'Content-Type: application/json' -d '{ "index" : { "max_result_window" : 500000 } }'
    

    I did not notice increased memory usage, for values of ~ 100k.

提交回复
热议问题