Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Result window is too large,
2017-10-24 10:42
976 查看
ES查询出现下面错误:
看到ES提示我结果窗口太大了,目前最大值为10000,而我却要求给我1346010。并且在后面也提到了要求我修改index.max_result_window参数来增大结果窗口大小。
在head中执行下面代码即可。
![](https://oscdn.geek-share.com/Uploads/Images/Content/202011/06/885c01d4c973fde09f94b10dd5a22e53)
注意:events是我的索引别名。
执行完后再ES上会有如下显示:
Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Result window is too large, from + size must be less than or equal to: [10000] but was [1346010]. 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. at org.elasticsearch.search.DefaultSearchContext.preProcess(DefaultSearchContext.java:203) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.search.query.QueryPhase.preProcess(QueryPhase.java:90) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.search.SearchService.createContext(SearchService.java:493) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:457) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:253) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.action.search.SearchTransportService$6.messageReceived(SearchTransportService.java:330) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.action.search.SearchTransportService$6.messageReceived(SearchTransportService.java:327) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:644) [elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) [elasticsearch-5.5.2.jar:5.5.2] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.5.2.jar:5.5.2] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_101] at java.lang.Thread.run(Unknown Source) [?:1.8.0_101] [2017-10-24T10:23:38,573][DEBUG][o.e.a.s.TransportSearchAction] [node-71] All shards failed for phase: [query]
看到ES提示我结果窗口太大了,目前最大值为10000,而我却要求给我1346010。并且在后面也提到了要求我修改index.max_result_window参数来增大结果窗口大小。
在head中执行下面代码即可。
注意:events是我的索引别名。
执行完后再ES上会有如下显示:
[2017-10-24T10:27:57,168][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,169][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,185][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,188][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,199][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,199][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,209][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,211][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,218][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,222][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,231][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,234][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,239][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,239][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,241][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,242][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,243][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,249][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,250][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,251][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,252][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,252][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000] [2017-10-24T10:27:57,254][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_result_window] from [10000] to [100000000] [2017-10-24T10:27:57,254][INFO ][o.e.c.s.IndexScopedSettings] [node-71] updating [index.max_rescore_window] from [10000] to [100000000]
相关文章推荐
- Linux服务器上日志报com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1783 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
- Caused by: org.hibernate.hql.ast.QuerySyntaxException: TkltEmpQuitProcess is not mapped. 问题解决
- packet for query is too large <1781> 1024 >. you can change this value on the server by setting the
- 解决com.mysql.jdbc.PacketTooBigException: Packet for query is too large (3158064)问题
- nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1109 > 1024
- nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1109 > 1024
- Packet for query is too large (1986748 > 1048576). You can change this value on the server by setting the max_allowed_pa
- 解决kylin报错:Failed to create dictionary on <db>.<table>, Caused by: java.lang.IllegalArgumentException: Too high cardinality is not suitable for dictionary
- 解决ElasticSearch深度分页机制中Result window is too large问题
- elasticsearchException:Failed to load logging configuration Caused by: java.nio.file.NoSuchFileExcep
- Caused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1169 > 1024)
- PacketTooBigException: Packet for query is too large
- Packet for query is too large (1032 > 1024). You can change this value on the server by setting the
- : com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1602269 > 1048576). You can c
- Packet for query is too large (1986748 > 1048576). You can change this value on the server by
- Caused by: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (4232009 > 4194304).
- Result window is too large 问题处理
- Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (144900 > 1024)