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+unsubscr...@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.

Reply via email to