# No search context found for id

**URL:** <https://discuss.elastic.co/t/no-search-context-found-for-id/364655>\
**Category:** Elasticsearch\
**Created:** [August 9, 2024, 8:21am UTC](https://discuss.elastic.co/t/no-search-context-found-for-id/364655 "2024-08-09T08:21:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaowenfeng998](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaowenfeng998/32/136665_2.png) [@yaowenfeng998](https://discuss.elastic.co/u/yaowenfeng998)\
**Post date:** [August 9, 2024, 8:21am UTC](https://discuss.elastic.co/t/no-search-context-found-for-id/364655/1 "2024-08-09T08:21:31Z")

</div>

I have a problem. elasticsearch queries data in batches by scroll. no matter how big the batch number is, only the data of the first batch can be queried. no search context found for id... Is the timeout period of the context set large enough or the same error is reported, will the search context be automatically deleted within es...

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/a/aaca1e8c41a95fc75164553e97d3929132f946ed.jpeg)

---

<div class="post-metadata">

**Author:** ![Artem\_Shelkovnikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_shelkovnikov/32/134322_2.png) [@Artem\_Shelkovnikov](https://discuss.elastic.co/u/Artem_Shelkovnikov)\
**Post date:** [August 9, 2024, 1:08pm UTC](https://discuss.elastic.co/t/no-search-context-found-for-id/364655/2 "2024-08-09T13:08:16Z")

</div>

From #Elastic Search to #Elasticsearch

---

<div class="post-metadata">

**Author:** ![Artem\_Shelkovnikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_shelkovnikov/32/134322_2.png) [@Artem\_Shelkovnikov](https://discuss.elastic.co/u/Artem_Shelkovnikov)\
**Post date:** [August 9, 2024, 1:08pm UTC](https://discuss.elastic.co/t/no-search-context-found-for-id/364655/3 "2024-08-09T13:08:16Z")

</div>

Removed #elastic-app-search

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [August 9, 2024, 5:19pm UTC](https://discuss.elastic.co/t/no-search-context-found-for-id/364655/4 "2024-08-09T17:19:21Z")

</div>

If you're using the [scroll](https://www.elastic.co/guide/en/elasticsearch/reference/current/scroll-api.html) query, it could very well be timing out. You can specify a timeout of up to `1d` in the request if that helps.

It's also worth noting that we recommend using [search after](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#search-after) over `scroll` in newer versions of Elasticsearch.

---

<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:** [September 6, 2024, 5:19pm UTC](https://discuss.elastic.co/t/no-search-context-found-for-id/364655/5 "2024-09-06T17:19:49Z")

</div>

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