Result window is too large, from + size must be less than or equal to: [10000]

简介: Result window is too large, from + size must be less than or equal to: [10000]

bug记录

最近在学Elasticsearch,查询报错Result window is too large, from + size must be less than or equal to: [10000]

记录下解决方法

错误信息:Result window is too large, from + size must be less than or equal to: [10000]

这是由于默认最大查询数量为10000,而我们代码中设置的查询数量大于这个数了。


因为我需要对es内的数据进行全量去重,所以设置了查询数为100000,所以导致报错。

9920220ef8234284a25f5e0bee57fc6c.png

解决方案

使用postman或者其他工具发送 PUT请求 :ip:端口/索引名称/_settings

请求体:

{
  "index":{
    "max_result_window":1000000
  }
}

17f9b5722e8a40f3b715d9dca842994e.png

或者 使用kibana,直接运行以下命令

PUT 索引名称/_settings
{
  "index":{
    "max_result_window":1000000
  }
}


相关文章
|
9月前
【Simulink】报错:Size mismatch (size [2 x 1] ~= size [1 x 1]). The size to the left is the size of the l
【Simulink】报错:Size mismatch (size [2 x 1] ~= size [1 x 1]). The size to the left is the size of the l
RuntimeError: Given groups=1, weight of size 64 128 1 7, expected input[16,
RuntimeError: Given groups=1, weight of size 64 128 1 7, expected input[16,
3011 0
|
索引
Result window is too large, from + size must be less than or equal to: [10000]
Result window is too large, from + size must be less than or equal to: [10000]
263 0
YOLO V5出现RuntimeError: result type Float can‘t be cast to the desired output type long int解决方法
YOLO V5出现RuntimeError: result type Float can‘t be cast to the desired output type long int解决方法
772 0
CVI2012报错:Function imaqMorphology: (errorCode == -1074396154 [0xbff60406]). The image is not large e
CVI2012报错:Function imaqMorphology: (errorCode == -1074396154 [0xbff60406]). The image is not large e
|
JSON 数据格式
ValueError: With n_samples=0, test_size=0.15 and train_size=None, the resulting train set will be em
ValueError: With n_samples=0, test_size=0.15 and train_size=None, the resulting train set will be em
568 0
ValueError: With n_samples=0, test_size=0.15 and train_size=None, the resulting train set will be em
|
人工智能 C++ Python
LeetCode 961. N-Repeated Element in Size 2N Array
LeetCode 961. N-Repeated Element in Size 2N Array
199 0
成功解决ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be
成功解决ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be
成功解决ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be