# "from and size" for ES-5.0.0 aggregation

**URL:** <https://discuss.elastic.co/t/from-and-size-for-es-5-0-0-aggregation/68515>\
**Category:** Elasticsearch\
**Created:** [December 9, 2016, 6:54am UTC](https://discuss.elastic.co/t/from-and-size-for-es-5-0-0-aggregation/68515 "2016-12-09T06:54:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hilal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hilal/32/7684_2.png) [@Hilal](https://discuss.elastic.co/u/Hilal)\
**Post date:** [December 9, 2016, 6:54am UTC](https://discuss.elastic.co/t/from-and-size-for-es-5-0-0-aggregation/68515/1 "2016-12-09T06:54:05Z")

</div>

Hi,

I want to do`from and size` for aggregation. I looked at this link ([https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-aggregations-bucket-terms-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-aggregations-bucket-terms-aggregation.html))

There is only the `size` part here. Not`from and size.`

Code below brings up 10 records starting from 0:

```
  GET abc/def/_search
    { "query": {
        "match": {
          "id": "11340073"
          } },
      "aggs":{
        "group_by_state":{
          "terms":{
            "field": "code",
        "size": "10"
            } } } }

```

It works but I want to do `"from": "5","size": "10"`

How can I do?

Thanks advance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 9, 2016, 7:42am UTC](https://discuss.elastic.co/t/from-and-size-for-es-5-0-0-aggregation/68515/2 "2016-12-09T07:42:25Z")

</div>

Look at this issue and the ending answer by Mark:

> <https://github.com/elastic/elasticsearch/issues/4915#issuecomment-262811809>

---

<div class="post-metadata">

**Author:** ![Hilal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hilal/32/7684_2.png) [@Hilal](https://discuss.elastic.co/u/Hilal)\
**Post date:** [December 9, 2016, 11:51am UTC](https://discuss.elastic.co/t/from-and-size-for-es-5-0-0-aggregation/68515/3 "2016-12-09T11:51:14Z")

</div>

Thank yo for your response.  
It is not possible to do this with as much as I understand.

---

<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:** [January 6, 2017, 11:52am UTC](https://discuss.elastic.co/t/from-and-size-for-es-5-0-0-aggregation/68515/4 "2017-01-06T11:52:04Z")

</div>

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