kazoompa_3
(kazoompa-3)
September 4, 2014, 9:01pm
1
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 elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c11848bb-7767-42da-a4c3-60892b766116%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
dadoonet
(David Pilato)
September 4, 2014, 9:09pm
2
You could try Elasticsearch Platform — Find real-time answers at scale | Elastic
Or this: Elasticsearch Platform — Find real-time answers at scale | Elastic
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 4 sept. 2014 à 23:01, kazoompa rhaeri@p3g.org 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 elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c11848bb-7767-42da-a4c3-60892b766116%40googlegroups.com .
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 elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/E01FBBCB-2918-4373-BD24-82CA26EF92F0%40pilato.fr .
For more options, visit https://groups.google.com/d/optout .
kazoompa_3
(kazoompa-3)
September 5, 2014, 1:41pm
3
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
Elasticsearch Platform — Find real-time answers at scale | Elastic
Or this:
Elasticsearch Platform — Find real-time answers at scale | Elastic
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 4 sept. 2014 à 23:01, kazoompa <rha...@p3g.org <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 elasticsearc...@googlegroups.com <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 elasticsearch+unsubscribe@googlegroups.com .
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 .
dadoonet
(David Pilato)
September 5, 2014, 1:49pm
4
Cool! Lot of things have changed since though!
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 5 sept. 2014 à 15:41, kazoompa rhaeri@p3g.org a écrit :
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 Elasticsearch Platform — Find real-time answers at scale | Elastic
Or this: Elasticsearch Platform — Find real-time answers at scale | Elastic
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 4 sept. 2014 à 23:01, kazoompa rha...@p3g.org 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 elasticsearc...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c11848bb-7767-42da-a4c3-60892b766116%40googlegroups.com .
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 elasticsearch+unsubscribe@googlegroups.com .
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 .
--
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/FB6AB667-5722-40D5-91FD-73FD65775011%40pilato.fr .
For more options, visit https://groups.google.com/d/optout .