elastic query match_all 数据目标超过10000条出错 Result window is too large

原由

elastic作文本索引,match_all目标索引超过10000条时,出错api

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Result window is too large, from + size must be less than or equal to: [10000] but was [500000]. 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 setting."
      }
    ],
    ... 省略无关 ...

尝试

根据关键字Result window is too large及错误提示,得知须要设置目标索引[index.max_result_window]less

解决

kibana直接修改(或以此格式代码内修改)code

PUT /idx_XXXXXXXXXXXXX/_settings
{
  "index": {
    "max_result_window":1000000
  }
}
相关文章
相关标签/搜索