# Paging via Lucene TopDocs.searchAfter() method

**URL:** <https://discuss.elastic.co/t/paging-via-lucene-topdocs-searchafter-method/8382>\
**Category:** Elasticsearch\
**Created:** [July 11, 2012, 8:32am UTC](https://discuss.elastic.co/t/paging-via-lucene-topdocs-searchafter-method/8382 "2012-07-11T08:32:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brett\_Wooldridge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brett_wooldridge/32/2819_2.png) [@Brett\_Wooldridge](https://discuss.elastic.co/u/Brett_Wooldridge)\
**Post date:** [July 11, 2012, 8:32am UTC](https://discuss.elastic.co/t/paging-via-lucene-topdocs-searchafter-method/8382/1 "2012-07-11T08:32:02Z")

</div>

Does ES support the "new" Lucene (3.5, 4.0) paging API described here under  
the covers?

[https://issues.apache.org/jira/browse/LUCENE-2215](https://issues.apache.org/jira/browse/LUCENE-2215)

It seems like this is the only scalable way to support paging. I notice  
that ES has a "scroll" operation, but the documentation also states:

"Scrolling is not intended for real time user requests, it is intended for  
cases like scrolling over large portions of data that exists within  
elasticsearch to reindex it for example."

The 'search' operation's from() and to() options, from my educated guess,  
uses a skipping type method, which is likely to fall over for large results  
(this was the reason the new paging API was created).

Brett

---

<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 6, 2017, 3:20am UTC](https://discuss.elastic.co/t/paging-via-lucene-topdocs-searchafter-method/8382/2 "2017-07-06T03:20:37Z")

</div>


