# Getting only 10 search results though I am getting more than 20000 hits

**URL:** <https://discuss.elastic.co/t/getting-only-10-search-results-though-i-am-getting-more-than-20000-hits/180164>\
**Category:** Elasticsearch\
**Created:** [May 8, 2019, 11:21am UTC](https://discuss.elastic.co/t/getting-only-10-search-results-though-i-am-getting-more-than-20000-hits/180164 "2019-05-08T11:21:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mandar.raj](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mandar.raj](https://discuss.elastic.co/u/mandar.raj)\
**Post date:** [May 8, 2019, 11:21am UTC](https://discuss.elastic.co/t/getting-only-10-search-results-though-i-am-getting-more-than-20000-hits/180164/1 "2019-05-08T11:21:11Z")

</div>

Getting only 10 search results though I am getting more than 20000 hits. I used size parameter in query but its limit is up to 10000, is there any way we can do pagination?

---

<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 8, 2019, 11:36am UTC](https://discuss.elastic.co/t/getting-only-10-search-results-though-i-am-getting-more-than-20000-hits/180164/2 "2019-05-08T11:36:24Z")

</div>

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:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 5, 2019, 11:36am UTC](https://discuss.elastic.co/t/getting-only-10-search-results-though-i-am-getting-more-than-20000-hits/180164/3 "2019-06-05T11:36:27Z")

</div>

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