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

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 )

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.
To view this discussion on the web visit 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.

On Thu, Feb 6, 2014 at 6:52 PM, Jun S. Kang 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
)

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4A0Tes75eZmL87g63VN4VtwGneTAsp_OMEL-en9TZ2Hw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.