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
  }
}
相关文章
Failed to execute ‘setAttribute‘ on ‘Element‘: ‘;min-height:‘ is not a valid attribute name.添加100vh
Failed to execute ‘setAttribute‘ on ‘Element‘: ‘;min-height:‘ is not a valid attribute name.添加100vh
|
3月前
【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,
2755 0
|
3月前
|
PHP
Trying to access array offset on value of type null
你就可以避免在null值上尝试访问数组偏移量的错误。 总的来说,当你遇到这个错误时,你应该回顾你的代码,确保在尝试访问数组偏移量之前,相关的变量已经被正确地初始化为一个数组,并且不是null。
1032 4
HalconDotNet.HTupleAccessException:“‘Cannot convert to double array‘ when accessing ‘HalconDotNet.HT
HalconDotNet.HTupleAccessException:“‘Cannot convert to double array‘ when accessing ‘HalconDotNet.HT
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]
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解决方法
613 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
error: x264_bit_depth undeclared (first use in this function) did you mean x264_picture_t
error: x264_bit_depth undeclared (first use in this function) did you mean x264_picture_t
142 0
|
程序员 算法框架/工具 Caffe
解决办法:error: 'size_t' does not name a type、unknown type name 'size_t'
解决办法:error: 'size_t' does not name a type、unknown type name 'size_t'
667 0