Caused by: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=Result window is too large, from + size must be less than or equal to: [10000] but was [10155].

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.]]

解析:要求查询到的结果数量大于10000条,es默认最大查10000条数据,当想查的数据大于10000时会抛出异常

解决方案:修改最大默认查询

修改脚本:


PUT summary_index/_settings?preserve_existing=true
{
  "max_result_window":"200000000"
}

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐