ResourceNotFoundException when running percolator query

I'm getting a lot of ResourceNotFoundExceptions when using percolator queries, and I cannot seem to fully understand why... So the document that is reported to be missing in an index, indeed is not there, but I don't understand why is then this exception thrown? Is it unexpected to call a percolator query on a document that is not yet indexed? Should the default behavior be more in line of returning an empty result? Or am I missing something?

The full stack trace is:

org.elasticsearch.transport.RemoteTransportException: [WTHMxFY][10.10.20.130:9300][indices:data/read/search[phase/query]]
Caused by: org.elasticsearch.ResourceNotFoundException: indexed document [<index_name>/<mapping_name>/<document_id>] couldn't be found
        at org.elasticsearch.percolator.PercolateQueryBuilder.doRewrite(PercolateQueryBuilder.java:380) ~[?:?]
        at org.elasticsearch.index.query.AbstractQueryBuilder.rewrite(AbstractQueryBuilder.java:263) ~[elasticsearch-5.5.2.jar:5.5.2]
        at org.elasticsearch.search.builder.SearchSourceBuilder.rewrite(SearchSourceBuilder.java:879) ~[elasticsearch-5.5.2.jar:5.5.2]
        at org.elasticsearch.search.internal.ShardSearchLocalRequest.rewrite(ShardSearchLocalRequest.java:236) ~[elasticsearch-5.5.2.jar:5.5.2]
        at org.elasticsearch.search.internal.ShardSearchTransportRequest.rewrite(ShardSearchTransportRequest.java:170) ~[elasticsearch-5.5.2.jar:5.5.2]
        at org.elasticsearch.search.SearchService.createSearchContext(SearchService.java:526) ~[elasticsearch-5.5.2.jar:5.5.2]
        at org.elasticsearch.search.SearchService.createContext(SearchService.java:475) ~[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.TcpTransport$RequestHandler.doRun(TcpTransport.java:1544) ~[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(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

We are at the moment using an outdated ES 5.5.2, but it is the plan to update soon.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.