# Terms Aggregrations: size=0 does not work (V1.0.RC2)

**URL:** <https://discuss.elastic.co/t/terms-aggregrations-size-0-does-not-work-v1-0-rc2/15649>\
**Category:** Elasticsearch\
**Created:** [February 6, 2014, 5:52pm UTC](https://discuss.elastic.co/t/terms-aggregrations-size-0-does-not-work-v1-0-rc2/15649 "2014-02-06T17:52:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jun\_S\_Kang](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@Jun\_S\_Kang](https://discuss.elastic.co/u/Jun_S_Kang)\
**Post date:** [February 6, 2014, 5:52pm UTC](https://discuss.elastic.co/t/terms-aggregrations-size-0-does-not-work-v1-0-rc2/15649/1 "2014-02-06T17:52:06Z")

</div>

Hi All,

I am testing the aggregations and it seems like setting size=0 in "terms  
aggregations" is not working as it should be.  
(Unless it is "added at 1.1.0" as it is noted on this document.  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-terms-aggregation.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-terms-aggregation.html) )

I constructed my query as below, expecting it to return _all buckets_.  
{  
"aggs": {  
"action\_result\_identity": {  
"terms": {  
"script": "doc['action'].value+'\_'+doc['result'].value",  
"size": 0  
}  
}  
}  
}

But, instead, I got response as below:

{  
"took": 1060,  
"timed\_out": false,  
"\_shards": {  
"total": 4,  
"successful": 4,  
"failed": 0  
},  
"hits": {  
"total": _143665_,  
"max\_score": 1,  
"hits": [...]  
},

- "aggregations": {\*
- 

```
 "action_result": {*

```

- 

```
    "buckets": []*

```

- 

```
 }*

```

- }\*  
}

If I set the "size" value as "143665" which is the safely large number (#  
of all documents), then ES responses with 10s of buckets.

Is this a bug or am I doing something wrong here?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/168ce7d3-4945-4a07-92b2-f4731b767897%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/168ce7d3-4945-4a07-92b2-f4731b767897%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [February 10, 2014, 9:28am UTC](https://discuss.elastic.co/t/terms-aggregrations-size-0-does-not-work-v1-0-rc2/15649/2 "2014-02-10T09:28:36Z")

</div>

On Thu, Feb 6, 2014 at 6:52 PM, Jun S. Kang [jun.s.kang@gmail.com](mailto:jun.s.kang@gmail.com) wrote

> I am testing the aggregations and it seems like setting size=0 in "terms  
> aggregations" is not working as it should be.  
> (Unless it is "added at 1.1.0" as it is noted on this document.  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-terms-aggregation.html)  
> )

Indeed, this feature will be available in Elasticsearch 1.1.0.

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4A0Tes75eZmL87g63VN4VtwGneTAsp\_OMEL-en9TZ2Hw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4A0Tes75eZmL87g63VN4VtwGneTAsp_OMEL-en9TZ2Hw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:51am UTC](https://discuss.elastic.co/t/terms-aggregrations-size-0-does-not-work-v1-0-rc2/15649/3 "2017-07-06T01:51:30Z")

</div>


