I think you should look at MultiSearch API
http://www.elasticsearch.org/guide/reference/api/multi-search.html .
In doc, it stated that you can define search_type (so I think you can use
count).
HTH
David.
Le 27 décembre 2012 à 16:56, Senussi muhammed.senussi@silicon-nile.com a écrit
:
a sample usage of count API : curl -XGET 'http://localhost:9200/_count' -d
'{"term" : { "lang": "en", "country": "Egypt" }}'
it'll return count of pages based on that term --->
{"count":104628,"_shards":{"total":10,"successful":10,"failed":0}} .
the question is : does count API support searching by multiple TERMs and
return multiple COUNTs ?
something like :
curl -XGET 'http://localhost:9200/_count' -d
'{
"term": [
{
"lang": "en",
"country": "Egypt"
},
{
"lang": "ar",
"country": "Egypt"
}
]
}'and the result would be :
[ {"count":104628,"_shards":{"total":10,"successful":10,"failed":0}},
{"count":2000,"_shards":{"total":10,"successful":10,"failed":0}} ]I want to get count of pages based on multiple terms .
--
--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
--