elasticsearch를 사용하여 페이지 조회를 할 때, 조회 기록이 10000시간을 초과하면 오류가 발생합니다
4416 단어 elasticsearch
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onInitialPhaseResult(AbstractSearchAsyncAction.java:223) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.action.search.AbstractSearchAsyncAction.access$100(AbstractSearchAsyncAction.java:58) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:148) ~[na:na]
at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:51) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1032) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1134) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1112) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.transport.TransportService$7.onFailure(TransportService.java:629) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:623) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) ~[elasticsearch-5.6.8.jar:5.6.8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_201]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_201]
Caused by: org.elasticsearch.transport.RemoteTransportException: [es-xh-1][192.168.5.57:9300][indices:data/read/search[phase/dfs]]
Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Result window is too large, from + size must be less than or equal to: [10000] but was [195900]. 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:202) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.search.query.QueryPhase.preProcess(QueryPhase.java:90) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.search.SearchService.createContext(SearchService.java:480) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:444) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.search.SearchService.executeDfsPhase(SearchService.java:221) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.action.search.SearchTransportService$5.messageReceived(SearchTransportService.java:320) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.action.search.SearchTransportService$5.messageReceived(SearchTransportService.java:317) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:618) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) ~[elasticsearch-5.6.8.jar:5.6.8]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-5.6.8.jar:5.6.8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_201]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_201]
솔루션: 첫 번째: curl-XPUThttp://127.0.0.1:9200/_settings -d '{ "index": { "max_result_window": 100000000}}‘
두 번째: config/elasticsearch.yml 파일의 마지막에 index를 추가합니다.max_result_윈도우: 100000000, 하지만 이런 방법은 맨 앞에 빈칸을 넣는 것을 주의해야 한다
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
kafka connect e elasticsearch를 관찰할 수 있습니다.No menu lateral do dashboard tem a opção de connectors onde ele mostra todos os clusters do kafka connect conectados atu...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.