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

后端 未结 7 1960
余生分开走
余生分开走 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:31

    The right solution would be to use scrolling.
    However, if you want to extend the results search returns beyond 10,000 results, you can do it easily with Kibana:

    Go to Dev Tools and just post the following to your index (your_index_name), specifing what would be the new max result window

    PUT your_index_name/_settings
    { 
      "max_result_window" : 500000 
    }
    

    If all goes well, you should see the following success response:

    {
      "acknowledged": true
    }
    

提交回复
热议问题