# How does size in a scan and scroll work?

**URL:** <https://discuss.elastic.co/t/how-does-size-in-a-scan-and-scroll-work/149758>\
**Category:** Elasticsearch\
**Created:** [September 25, 2018, 4:06am UTC](https://discuss.elastic.co/t/how-does-size-in-a-scan-and-scroll-work/149758 "2018-09-25T04:06:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prabhath](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@prabhath](https://discuss.elastic.co/u/prabhath)\
**Post date:** [September 25, 2018, 4:06am UTC](https://discuss.elastic.co/t/how-does-size-in-a-scan-and-scroll-work/149758/1 "2018-09-25T04:06:31Z")

</div>

I was wondering how `size` in a scan and scroll request works? In the latest [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html), it specifies

> The `size` parameter allows you to configure the maximum number of hits to be returned with each batch of results.

Looking at some older documentation I found the below

> Although we specified a `size` of 1,000, we get back many more documents. When scanning, the `size` is applied to each shard, so you will get back a maximum of `size * number_of_primary_shards` documents in each batch.

Is the above statement still true?

If true, does it aggregate all the results from each shard and return the results in batches of 1,000 on every scroll?

---

<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:** [October 23, 2018, 4:17am UTC](https://discuss.elastic.co/t/how-does-size-in-a-scan-and-scroll-work/149758/2 "2018-10-23T04:17:07Z")

</div>

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