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

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

    In my case it looks like reducing the results via the from & size prefixes to the query will remove the error as we don't need all the results:

    GET widgets_development/_search
    {
      "from" : 0, 
      "size": 5,
      "query": {
        "bool": {}
      },
      "sort": {
        "col_one": "asc"
      }
    }
    

提交回复
热议问题