<!-- # org.elasticsearch.search.query.QueryPhaseExecutionException --> <!-- org-elasticsearch-search-query-QueryPhaseExecutionException --> 当查询结果超过 10000 且当前页含 10000 条之后的数据时,报了如下错误: > Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Result window is too large, from + size must be less than or equal to: [10000] but was [100000]. 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. [这篇博客][1] 中讲了如何通过 *curl* 命令设置 *index.number_of_replicas* 属性。 *windows* 上默认没有 *curl* 命令,不过我发现可以在 *Kibana* 上通过界面就可以设置。 在 *Kibana* => *Management* => *Index Management* 上点击对应的索引,然后在 *Edit settings* 标签可以修改索引设置。 下面是将 *index.max_result_window* 设置为 *1000000* 。 ```json { "index.blocks.read_only_allow_delete": "false", "index.priority": "1", "index.query.default_field": [ "*" ], "index.write.wait_for_active_shards": "1", "index.refresh_interval": "1s", "index.max_result_window": "1000000", "index.number_of_replicas": "1" } ``` [1]:https://www.cnblogs.com/binbinyouni/p/10749985.html (ES更改参数max_result_window) [2]:https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html (Elasticsearch Reference [7.9] » Index modules) Loading... 版权声明:本文为博主「佳佳」的原创文章,遵循 CC 4.0 BY-NC-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://www.liujiajia.me/2020/9/14/org-elasticsearch-search-query-QueryPhaseExecutionException 提交