I have an aggregation that sums a field and buckets the field by another field.
I understand from Elastic 2.3 release changes that the search_type=count is deprecated. I am running Elastic 2.2 and when I remove the search_type=count and add a ""size":0" clause to the body, I get my aggregation counts as before.
However, with the size 0 clause I only see the first 10 buckets. How to do I get all the buckets of the aggregation and the counts?
I think I found the answer. If I put ""size": 0" in the aggregation term, then I get all the buckets. Putting ""size": 0" in the request body outer scope returns counts rather than full document.
So, in summary, you need two of these size clauses.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.