# How to query and get all records using elasticsearch in POST call without scroll event?

**URL:** <https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086>\
**Category:** Elasticsearch\
**Created:** [January 7, 2020, 3:33pm UTC](https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086 "2020-01-07T15:33:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaviraj](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@kaviraj](https://discuss.elastic.co/u/kaviraj)\
**Post date:** [January 7, 2020, 3:33pm UTC](https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086/1 "2020-01-07T15:33:29Z")

</div>

Need to get all records in POST request without scroll .

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2020, 3:52pm UTC](https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086/2 "2020-01-07T15:52:41Z")

</div>

Welcome.

You can use [`size` and `from` parameters](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html) to display by default up to 10000 records to your users. If you want to change this limit, you can change `index.max_result_window` setting but be aware of the consequences (ie memory).  
You can use the [search after](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html) feature to do deep pagination.  
You can use the [Scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html) if you want to extract a resultset to be consumed by another tool later.

---

<div class="post-metadata">

**Author:** ![kaviraj](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@kaviraj](https://discuss.elastic.co/u/kaviraj)\
**Post date:** [January 7, 2020, 3:59pm UTC](https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086/3 "2020-01-07T15:59:34Z")

</div>

Thanks for the quick response,  
without giving static value as 10k ,can we do any other....  
In my work no scroll and search used..  
The only thing i need to get all records from index

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 7, 2020, 4:12pm UTC](https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086/4 "2020-01-07T16:12:22Z")

</div>

You can't.

---

<div class="post-metadata">

**Author:** ![kaviraj](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@kaviraj](https://discuss.elastic.co/u/kaviraj)\
**Post date:** [January 7, 2020, 4:18pm UTC](https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086/5 "2020-01-07T16:18:11Z")

</div>

I tried to give size as 10k, now its getting all records.  
what my opinion is without statically we need to do.  
You said no option.  
Thanks David , I will made the changes with size as 10K

---

<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:** [February 4, 2020, 4:28pm UTC](https://discuss.elastic.co/t/how-to-query-and-get-all-records-using-elasticsearch-in-post-call-without-scroll-event/214086/6 "2020-02-04T16:28:12Z")

</div>

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