ElasticSearch查询报错:type=illegal

ElasticSearch查询报错:type=illegal,第1张

ElasticSearch查询报错:type=illegal

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"
}

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5702198.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存