Fantastic, Thanks David. BTW, I have to thank you for your video presentation in French, it really helped me a lot to understand the basics od ES two years ago.
Cheers. On Thursday, September 4, 2014 5:09:35 PM UTC-4, David Pilato wrote: > > You could try > http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-multi-search.html > > Or this: > http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-global-aggregation.html > > -- > David ;-) > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs > > > Le 4 sept. 2014 à 23:01, kazoompa <[email protected] <javascript:>> a écrit : > > Hi, > > I would like to know whether I can perform a query and get not only the > total hits but also the total document counts. > > Here is an example of one of my queries: > > { > "from" : 0, > "size" : 30, > "query" : { > "filtered" : { > "query" : { > "match_all" : { } > }, > "filter" : { > "bool" : { > "must" : { > "terms" : { > "valueType" : [ "decimal" ] > } > } > } > } > } > }, > "aggregations" : { > "variableType" : { > "terms" : { > "field" : "variableType", > "order" : { > "_term" : "asc" > } > } > } > } > } > > > > And a part of my sample response: > > { > "took" : 7, > "timed_out" : false, > "_shards" : { > "total" : 5, > "successful" : 5, > "failed" : 0 > }, > "hits" : { > "total" : 285, > "max_score" : 1.0, > "hits" : [ {...} ] > } > > I would love to include the total documents count as well, as if I had > done a *match_all()* query only. > > 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 [email protected] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/c11848bb-7767-42da-a4c3-60892b766116%40googlegroups.com > > <https://groups.google.com/d/msgid/elasticsearch/c11848bb-7767-42da-a4c3-60892b766116%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/9964220a-0c74-4164-a49d-b13e0fc8a3f7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
