HOW: Retrieve Terms aggregation's grand total of all bucket doc_counts

Hi,

Is there an ES way to get a grand total of doc_count of all buckets of a
Terms aggregation? For instance to get 20 for the following:

{

"aggregations" : {
    "genders" : {
        "buckets" : [
            {
                "key" : "male",
                "doc_count" : 10
            },
            {
                "key" : "female",
                "doc_count" : 10
            },
        ]
    }
}

}

I am hoping of a hidden option in the query syntax that doesn't slow down
the query.

Thanks a lot.

--
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/39340e70-65f5-4656-8f31-33e4ef7767e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.