# Recommended Pagination Method for Real-time User Requests

**URL:** <https://discuss.elastic.co/t/recommended-pagination-method-for-real-time-user-requests/71446>\
**Category:** Elasticsearch\
**Created:** [January 12, 2017, 10:55pm UTC](https://discuss.elastic.co/t/recommended-pagination-method-for-real-time-user-requests/71446 "2017-01-12T22:55:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsccheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gsccheng/32/13904_2.png) [@gsccheng](https://discuss.elastic.co/u/gsccheng)\
**Post date:** [January 12, 2017, 10:55pm UTC](https://discuss.elastic.co/t/recommended-pagination-method-for-real-time-user-requests/71446/1 "2017-01-12T22:55:11Z")

</div>

I'm looking for a good way to paginate user search requests. I see the scrolling feature but it is explained from the docs:

> Scrolling is not intended for real time user requests, but rather for processing large amounts of data  
> So, what will be recommended ways to paginate real-time user requests? [These](http://stackoverflow.com/questions/25455088/elasticsearch-documentation-says-not-to-use-scroll-for-user-requests-only-for-d) answers seem a bit outdated.

I know there are ways to filter using timestamps and then use the `from`/`size` method, but wouldn't that not take into account deleted documents?

Thanks!

---

<div class="post-metadata">

**Author:** ![gsccheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gsccheng/32/13904_2.png) [@gsccheng](https://discuss.elastic.co/u/gsccheng)\
**Post date:** [January 12, 2017, 11:01pm UTC](https://discuss.elastic.co/t/recommended-pagination-method-for-real-time-user-requests/71446/2 "2017-01-12T23:01:05Z")

</div>

Okay, I think I may have found my solution, as described here, to use Search After: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html)

---

<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 9, 2017, 11:01pm UTC](https://discuss.elastic.co/t/recommended-pagination-method-for-real-time-user-requests/71446/3 "2017-02-09T23:01:11Z")

</div>

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