+1 for the most elegant solution so far :) -- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com
> 22. jan. 2019 kl. 03:15 skrev Joel Bernstein <joels...@gmail.com>: > > Streaming Expressions can do this: > > plist(stats(collection1, q="*:*", count(*)), > stats(collection2, q="*:*", count(*)), > stats(collection2, q="*:*", count(*))) > > The plist function is a parallel list of expressions. It will spin each > expression off in it's own thread and concatenate the results of each > expression into a single result set. > Here are the docs: > https://lucene.apache.org/solr/guide/7_6/stream-source-reference.html#stats > https://lucene.apache.org/solr/guide/7_6/stream-decorator-reference.html#plist > > plist is quite new, but "list" has been around for a while if you have an > older version of Solr > > https://lucene.apache.org/solr/guide/7_6/stream-decorator-reference.html#list_expression > > > > > > > > > Joel Bernstein > http://joelsolr.blogspot.com/ > > > On Mon, Jan 21, 2019 at 12:53 PM Jens Brandt <bra...@docoloc.de> wrote: > >> Hi, >> >> maybe adding &shards.info=true might help. In case of SolrCloud this >> gives you numFound for each shard. >> >> Regards, >> Jens >> >>> Am 10.01.2019 um 04:40 schrieb Zheng Lin Edwin Yeo <edwinye...@gmail.com >>> : >>> >>> Hi, >>> >>> I would like to find out, is there any way that I can send a single query >>> to retrieve the numFound for all the individual collections? >>> >>> I have tried with this query >>> >> http://localhost:8983/solr/collection1/select?q=*:*&collection=collection1,collection2 >>> However, this query is doing the sum of all the collections, instead of >>> showing the count for each of the collection. >>> >>> I am using Solr 7.5.0. >>> >>> Regards, >>> Edwin >> >>