# SearchContextMissingException Failed to execute fetch phase

**URL:** <https://discuss.elastic.co/t/searchcontextmissingexception-failed-to-execute-fetch-phase/21179>\
**Category:** Elasticsearch\
**Created:** [December 10, 2014, 6:46am UTC](https://discuss.elastic.co/t/searchcontextmissingexception-failed-to-execute-fetch-phase/21179 "2014-12-10T06:46:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [December 10, 2014, 6:46am UTC](https://discuss.elastic.co/t/searchcontextmissingexception-failed-to-execute-fetch-phase/21179/1 "2014-12-10T06:46:15Z")

</div>

Hi elasticsearch,

The following exception thrown in cluster 0.90.7 and I'm not sure what is  
this exception and why the id is not available?

Based on the following stack trace, my guess is that the problem could be  
probably due to during execute fetch of a search, the id is not found in  
the search context, hence this search will yield no result but I'm not sure  
how this is reproducible?

Can anyone explain what is this and how this is reproducible? Thank you.

Jason

[2014-12-01 16:19:25,615][DEBUG][action.search.type] [node2] [84137]  
Failed to execute fetch phase  
org.elasticsearch.transport.RemoteTransportException:  
[node4][inet[/123.123.123.123:9300]][search/phase/fetch/id]  
Caused by: org.elasticsearch.search.SearchContextMissingException: No  
search context found for id [84137]  
at  
org.elasticsearch.search.SearchService.findContext(SearchService.java:445)  
at  
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:418)  
at  
org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:728)  
at  
org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:717)  
at  
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:270)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)  
[2014-12-01 16:19:25,624][DEBUG][action.search.type] [node2]  
[337701] Failed to execute fetch phase  
org.elasticsearch.transport.RemoteTransportException:  
[node3][inet[/123.123.123.124:9300]][search/phase/fetch/id]  
Caused by: org.elasticsearch.search.SearchContextMissingException: No  
search context found for id [337701]  
at  
org.elasticsearch.search.SearchService.findContext(SearchService.java:445)  
at  
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:418)  
at  
org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:728)  
at  
org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:717)  
at  
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:270)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/274b2aa5-fb2f-43d7-933f-9822e8b627d5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/274b2aa5-fb2f-43d7-933f-9822e8b627d5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [December 16, 2014, 5:52am UTC](https://discuss.elastic.co/t/searchcontextmissingexception-failed-to-execute-fetch-phase/21179/2 "2014-12-16T05:52:19Z")

</div>

Anyone has any idea?

On Wednesday, December 10, 2014 2:46:15 PM UTC+8, Jason Wee wrote:

> Hi elasticsearch,
> 
> The following exception thrown in cluster 0.90.7 and I'm not sure what is  
> this exception and why the id is not available?
> 
> Based on the following stack trace, my guess is that the problem could be  
> probably due to during execute fetch of a search, the id is not found in  
> the search context, hence this search will yield no result but I'm not sure  
> how this is reproducible?
> 
> Can anyone explain what is this and how this is reproducible? Thank you.
> 
> Jason
> 
> [2014-12-01 16:19:25,615][DEBUG][action.search.type] [node2]  
> [84137] Failed to execute fetch phase  
> org.elasticsearch.transport.RemoteTransportException:  
> [node4][inet[/123.123.123.123:9300]][search/phase/fetch/id]  
> Caused by: org.elasticsearch.search.SearchContextMissingException: No  
> search context found for id [84137]  
> at  
> org.elasticsearch.search.SearchService.findContext(SearchService.java:445)  
> at  
> org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:418)  
> at  
> org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:728)  
> at  
> org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:717)  
> at  
> org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:270)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)  
> [2014-12-01 16:19:25,624][DEBUG][action.search.type] [node2]  
> [337701] Failed to execute fetch phase  
> org.elasticsearch.transport.RemoteTransportException:  
> [node3][inet[/123.123.123.124:9300]][search/phase/fetch/id]  
> Caused by: org.elasticsearch.search.SearchContextMissingException: No  
> search context found for id [337701]  
> at  
> org.elasticsearch.search.SearchService.findContext(SearchService.java:445)  
> at  
> org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:418)  
> at  
> org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:728)  
> at  
> org.elasticsearch.search.action.SearchServiceTransportAction$SearchFetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:717)  
> at  
> org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:270)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3e7d7c90-85dc-47dc-ac47-45334f04e05a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3e7d7c90-85dc-47dc-ac47-45334f04e05a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:43am UTC](https://discuss.elastic.co/t/searchcontextmissingexception-failed-to-execute-fetch-phase/21179/3 "2017-07-06T00:43:33Z")

</div>


