SearchContextMissingException: No search context found


(Dave) #1

Hey! I ran a search query on multiple indices, in parallel with a delete index query on those indices. The search failed with this error:

[2015-06-15 23:51:53,696][INFO ][cluster.metadata ] [node-ba3d5edd-4e7e-4d5e-959c-7a2637620bdf] [metadata-c4120@16366] deleting index [2015-06-15 23:51:53,776][DEBUG][action.search.type ] [node-ba3d5edd-4e7e-4d5e-959c-7a2637620bdf] [2194] Failed to execute fetch phase org.elasticsearch.search.SearchContextMissingException: No search context found for id [2194] at org.elasticsearch.search.SearchService.findContext(SearchService.java:522) at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:492) at org.elasticsearch.search.action.SearchServiceTransportAction$17.call(SearchServiceTransportAction.java:452) at org.elasticsearch.search.action.SearchServiceTransportAction$17.call(SearchServiceTransportAction.java:449) at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) [2015-06-15 23:51:53,836][INFO ][cluster.metadata ] [node-ba3d5edd-4e7e-4d5e-959c-7a2637620bdf] [metadata-c4120@16576] deleting index

. Is that supposed to happen?


(Mark Walkom) #2

If you try to query an index that is deleted, then yes, this is expected.


(Andrew Swan) #3

Thanks Mark. I'm unfamiliar with ES internals at this level of detail but the name and wording in this exception make it sound like something more general than the scenario that Dave describes. Is it possible to characterize all the conditions under which a query can fail with a SearchContentMissingException?

To make it concrete, I would like to ignore this error if it happens in the way described in the original question (simultaneously querying and deleting an index) but ignoring every instance of this exception makes me nervous. Are there any resource other than the source code and the discussion board (eg documentaiton?) for understanding and interpreting these errors?


(Mark Walkom) #4

Unfortunately, not at this stage.


(system) #5