# Scroll API size parameter

**URL:** <https://discuss.elastic.co/t/scroll-api-size-parameter/87244>\
**Category:** Elasticsearch\
**Created:** [May 26, 2017, 10:56am UTC](https://discuss.elastic.co/t/scroll-api-size-parameter/87244 "2017-05-26T10:56:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vionita](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vionita/32/18509_2.png) [@vionita](https://discuss.elastic.co/u/vionita)\
**Post date:** [May 26, 2017, 10:56am UTC](https://discuss.elastic.co/t/scroll-api-size-parameter/87244/1 "2017-05-26T10:56:57Z")

</div>

Hi all

According to the [documentation](https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.4/java-search-scrolling.html), when I set size of N for a scroll, I will get a number of results per page which is equal to N x numberOfShards.

The problem is I can not reproduce this behaviour. In my tests I get the wanted size N and also the order works. Which is fine by me, it's just confusing that the documentation states the opposite.

Did this behaviour changed in version 2.0 (or other version)?

Can I rely on the fact that when using scroll, the size I request is the size I get and also ordered? The Elasticsearch version I'm using is 2.4.

Thank you,  
Valentin

#elasticsearch #scroll #paging

---

<div class="post-metadata">

**Author:** ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)\
**Post date:** [May 26, 2017, 12:19pm UTC](https://discuss.elastic.co/t/scroll-api-size-parameter/87244/2 "2017-05-26T12:19:06Z")

</div>

Hi, I'm agree with you, the size N seems not be "per shard". Results are well ordered and scrolled. Strange...

---

<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 23, 2017, 12:19pm UTC](https://discuss.elastic.co/t/scroll-api-size-parameter/87244/3 "2017-06-23T12:19:08Z")

</div>

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