# How to get all results , By Ignoring "size" in query

**URL:** <https://discuss.elastic.co/t/how-to-get-all-results-by-ignoring-size-in-query/179237>\
**Category:** Elasticsearch\
**Created:** [May 1, 2019, 6:56pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-by-ignoring-size-in-query/179237 "2019-05-01T18:56:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![examin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/examin/32/70688_2.png) [@examin](https://discuss.elastic.co/u/examin)\
**Post date:** [May 1, 2019, 6:56pm UTC](https://discuss.elastic.co/t/how-to-get-all-results-by-ignoring-size-in-query/179237/1 "2019-05-01T18:56:20Z")

</div>

By Default a query return 10 results, But i can handle all results and need them all at a time .Yes i can specify size to get all. But for i don't know how many results are their. So , may i make two queries first to get size and second with Query having exact "size". ,Right now i am using "max size limit" as my "size "in query, But i think this might be making elasticsearch use more RAM. Please guide me, on this topic

---

<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:** [May 2, 2019, 12:25am UTC](https://discuss.elastic.co/t/how-to-get-all-results-by-ignoring-size-in-query/179237/2 "2019-05-02T00:25:29Z")

</div>

Look at the scroll API.

---

<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:** [May 30, 2019, 12:25am UTC](https://discuss.elastic.co/t/how-to-get-all-results-by-ignoring-size-in-query/179237/3 "2019-05-30T00:25:47Z")

</div>

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