Result window is too large 問題處理

報錯內如如下:
  {"error" : {
    "root_cause" : [ {
      "type" : "query_phase_execution_exception",
      "reason" : "Result window is too large, from + size must be less than or equal to: [10000] but was [12000]. See the scroll api for a more efficient way to reques
t large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."
    } ],
    ...}
根據錯誤提示瞭解到默認的最大size大小爲10000,可以通過設置如下參數解決:
curl -XPUT  localhost:9200/index_name/_settings  -d '{ "index" : { "max_result_window" : 1000000}}'
這裏的index_name是指索引名稱,替換成你自己定義的索引名稱。
有關官方針對index的相關配置介紹:
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章