# Does ES2 Support scroll and search\_after for Retrieving \>10K Data

**URL:** <https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104>\
**Category:** Elasticsearch\
**Created:** [November 12, 2021, 10:20pm UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104 "2021-11-12T22:20:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![theodoreandrew](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@theodoreandrew](https://discuss.elastic.co/u/theodoreandrew)\
**Post date:** [November 12, 2021, 10:20pm UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104/1 "2021-11-12T22:20:19Z")

</div>

Hey guys,

I have a question about ES version 2. Does ES2 support scroll and search\_after for retrieving \>10K data?

If ES2 doesn't support scroll and search\_after, how can I retrieve \>10K data on ES2?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 14, 2021, 6:15am UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104/2 "2021-11-14T06:15:00Z")

</div>

Elasticsearch 2.x is VERY old and have been EOL a for many years now. You should really look to upgrade, especially as a lot of improvements have been made in the area you are asking about.

As far as I can recall you will need to [use a scroll query](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-scroll.html) to retrieve large number of documents in Elasticsearch 2.x.

---

<div class="post-metadata">

**Author:** ![theodoreandrew](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@theodoreandrew](https://discuss.elastic.co/u/theodoreandrew)\
**Post date:** [November 16, 2021, 5:02pm UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104/3 "2021-11-16T17:02:56Z")

</div>

Gotcha. I assume that search\_after is not supported in ES2 right?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 16, 2021, 5:03pm UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104/4 "2021-11-16T17:03:34Z")

</div>

I do not think so.

---

<div class="post-metadata">

**Author:** ![theodoreandrew](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@theodoreandrew](https://discuss.elastic.co/u/theodoreandrew)\
**Post date:** [November 16, 2021, 5:17pm UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104/5 "2021-11-16T17:17:12Z")

</div>

I wanna ask, in which case can I use scroll api instead of search\_after? What are difference between the two? I know that scroll keeps the index open until we close it or the time expires, but I am still not really clear about the difference.

Also, I am not clear about what it means by real time request because I saw that scroll is not intended for real time user request. Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 16, 2021, 5:27pm UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104/6 "2021-11-16T17:27:17Z")

</div>

Elasticsearch 2.x is as I stated earlier VERY old. I would recommend upgrading. I have not used that version in years and remember very little. Not sure I can help more than that.

---

<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:** [December 14, 2021, 5:27pm UTC](https://discuss.elastic.co/t/does-es2-support-scroll-and-search-after-for-retrieving-10k-data/289104/7 "2021-12-14T17:27:29Z")

</div>

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