# If scrolling isn't recommended for user requests, what to use?

**URL:** <https://discuss.elastic.co/t/if-scrolling-isnt-recommended-for-user-requests-what-to-use/54831>\
**Category:** Elasticsearch\
**Created:** [July 6, 2016, 1:59pm UTC](https://discuss.elastic.co/t/if-scrolling-isnt-recommended-for-user-requests-what-to-use/54831 "2016-07-06T13:59:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fikse](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@fikse](https://discuss.elastic.co/u/fikse)\
**Post date:** [July 6, 2016, 1:59pm UTC](https://discuss.elastic.co/t/if-scrolling-isnt-recommended-for-user-requests-what-to-use/54831/1 "2016-07-06T13:59:02Z")

</div>

When a user needs to get all instances of a field matching `/cars/123`, I use search for retrieving the results with a maximum result of 10,000. I can see the number of hits easily exceeding ten thousand, so I've started looking into `scroll`. However, [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html) mentions the following:

```auto
Scrolling is not intended for real time user requests, but rather for processing large amounts of data, e.g. in order to reindex the contents of one index into a new index with a different configuration.

```

If scrolling isn't recommended for user requests, then what should I use for get all the results? Is there another way to query without limiting the maximum number of results returned?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 6, 2016, 2:22pm UTC](https://discuss.elastic.co/t/if-scrolling-isnt-recommended-for-user-requests-what-to-use/54831/2 "2016-07-06T14:22:28Z")

</div>

No, there isn't another way. Scrolling is probably the thing you want to use if you really want to do it. **But** you've found a thing that Elasticsearch doesn't like doing very much. To us, getting all the documents for a user request is a use case we barely support. We push people to use aggregations if they want to do things across many many documents because that is much faster.

Usually for a search use case you limit the depth you allow users to search. Like [this](https://www.google.com/#q=test&start=2100) or [this](https://en.wikipedia.org/w/index.php?title=Special:Search&limit=20&offset=20000&profile=default&search=test&searchToken=bq4vkzz37iupwq1rppy32m0z3). The last one actually uses 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:** [July 5, 2017, 10:37pm UTC](https://discuss.elastic.co/t/if-scrolling-isnt-recommended-for-user-requests-what-to-use/54831/3 "2017-07-05T22:37:40Z")

</div>


