How do I use doc_count in an aggregations range query in ElasticSearch 1.0
I have updated https://github.com/elasticsearch/elasticsearch/issues/4983?_pjax=%23js-repo-pjax-container with this issue as well.
Looks like a minor enhancement to the aggregation framework (but) will be really useful.
you can probably do something like :
{ "aggs" : { "tally" : { "sum" : { "script": "1" } }, "aggs" : { //refer to tally here as the value would be same as doc_count } } }