<p dir="auto">See<br>
<a href="https://groups.google.com/d/msg/elasticsearch/OZsc5ofNhag/9JfwSy-CEMwJ" rel="nofollow">https://groups.google.com/d/msg/elasticsearch/OZsc5ofNhag/9JfwSy-CEMwJ</a> where Shay says "...with the design of the facets, if shouldn't be hard to implement..."</p>
<p dir="auto">This might sound entirely trivial, but this would be a real boon for consistency in our aggregation parsing code. <code class="notranslate">doc_count</code> is currently a property of each bucket in a bucket agg, which makes it an exception when walking the aggregation tree.</p>
<p dir="auto">If we could get a dedicated <code class="notranslate">doc_count</code> metric agg we could handle it the same way we handle every other metric agg, even if its only purpose is to duplicate the <code class="notranslate">doc_count</code> property of the bucket.</p>