# REST Pagination

**URL:** <https://discuss.elastic.co/t/rest-pagination/3853>\
**Category:** Elasticsearch\
**Created:** [January 31, 2011, 10:48pm UTC](https://discuss.elastic.co/t/rest-pagination/3853 "2011-01-31T22:48:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brlyns](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@Brlyns](https://discuss.elastic.co/u/Brlyns)\
**Post date:** [January 31, 2011, 10:48pm UTC](https://discuss.elastic.co/t/rest-pagination/3853/1 "2011-01-31T22:48:24Z")

</div>

Are there any docs out there on REST pagination? I am trying to pagination the results. .

---

<div class="post-metadata">

**Author:** ![aditya\_kulkarni](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@aditya\_kulkarni](https://discuss.elastic.co/u/aditya_kulkarni)\
**Post date:** [February 3, 2011, 10:30am UTC](https://discuss.elastic.co/t/rest-pagination/3853/2 "2011-02-03T10:30:38Z")

</div>

Is this what you are looking for?  
[http://www.elasticsearch.com/docs/elasticsearch/rest\_api/search/from\_size/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/from_size/)

"from" : 0, -\>This is start point, this you can go on incrementing according to size X.  
"size" : X, -\> This is number of entries to be returned say X=10 for 10 results per page

Please note, I am not sure of memory or performance implications. Just learning about ES. Any takers for this?

Best Regards,  
a

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 7, 2011, 6:04pm UTC](https://discuss.elastic.co/t/rest-pagination/3853/3 "2011-02-07T18:04:45Z")

</div>

Yep, tahts what you would use. Though, for a 1 million hits, asking for from: 900,000 is not recommended because of the memory implications of it.  
On Thursday, February 3, 2011 at 12:30 PM, aditya.kulkarni wrote:

> Is this what you are looking for?  
> [http://www.elasticsearch.com/docs/elasticsearch/rest\_api/search/from\_size/](http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/from_size/)
> 
> "from" : 0, -\>This is start point, this you can go on incrementing according  
> to size X.  
> "size" : X, -\> This is number of entries to be returned say X=10 for 10  
> results per page
> 
> Please note, I am not sure of memory or performance implications. Just  
> learning about ES. Any takers for this?
> 
> ## Best Regards, a
> 
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/REST-Pagination-tp2392620p2412370.html](http://elasticsearch-users.115913.n3.nabble.com/REST-Pagination-tp2392620p2412370.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![rboulton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rboulton/32/3271_2.png) [@rboulton](https://discuss.elastic.co/u/rboulton)\
**Post date:** [February 7, 2011, 6:15pm UTC](https://discuss.elastic.co/t/rest-pagination/3853/4 "2011-02-07T18:15:15Z")

</div>

On 7 February 2011 18:04, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:

> Yep, tahts what you would use. Though, for a 1 million hits, asking for  
> from: 900,000 is not recommended because of the memory implications of it.

Presumably, it's still way better than doing {from: 0, size: 900010}  
and pulling off the last 10, though!

--  
Richard

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 7, 2011, 6:26pm UTC](https://discuss.elastic.co/t/rest-pagination/3853/5 "2011-02-07T18:26:19Z")

</div>

Right :). Though, I plan to introduce a new search type called "scan" that will allow for that though without doing any sorting (scoring or otherwise).  
On Monday, February 7, 2011 at 8:15 PM, Richard Boulton wrote:

> On 7 February 2011 18:04, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:
> 
> > Yep, tahts what you would use. Though, for a 1 million hits, asking for  
> > from: 900,000 is not recommended because of the memory implications of it.
> 
> Presumably, it's still way better than doing {from: 0, size: 900010}  
> and pulling off the last 10, though!
> 
> --  
> Richard

---

<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, 4:12am UTC](https://discuss.elastic.co/t/rest-pagination/3853/6 "2017-07-06T04:12:26Z")

</div>


