You get it from the search request that wraps the terms aggregation, under total hits in the root of the response
-- Itamar Syn-Hershko http://code972.com | @synhershko <https://twitter.com/synhershko> Freelance Developer & Consultant Author of RavenDB in Action <http://manning.com/synhershko/> On Wed, Jul 16, 2014 at 4:56 PM, Michael Sander <[email protected]> wrote: > Hi, > > I've started using aggregations heavily to make nifty little pie charts > like the one below. To generate the pie chart below, I ran a terms > aggregation on a particular field which has entries such as Sterne, Fish, > etc. However, the terms aggregation only returns a doc_count for each > individual term, but I'd also like to know the total doc_count so that I > can create another pie slice for "other." Is there any way to do this in a > single aggregation call? > > Thanks, > > > <https://lh6.googleusercontent.com/-QaE4hTZVH-s/U8aD-Hifq_I/AAAAAAAACTQ/jnCH4frOURk/s1600/pie.png> > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/3f2f9311-52ff-4917-9d50-a48635f60957%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/3f2f9311-52ff-4917-9d50-a48635f60957%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZuzRTe48eGgm%2BweE%2BnkzhZTpc8wp0bZoCYbGvLeEkZS5Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
