Using solrcloud 4.6, let's say I have a 8 node cluster with a shard running on each node and many different collections. Basically a collections is made each day (to partition the data). Now the question is how to search all of the collection without knowing their names?
The wiki says I can do this:
http://localhost:8983/solr/collection1/select?collection=collection1_NY,collection1_NJ,collection1_CT
which is basically searching multiple collections at the same time. But in my case collections are dynamically created and I don't know the current names.
Is there a way to send a generic search query that hits all the collections?
Or a way to specify a range of collections like collection1-10
or collection*2013
?
I also know I can hook into the ZK and get the info but that would be too advanced for what I'm doing.
This should be done with SOLR-5466 (EDIT this is done as of 4.8), but has no patch ready yet...
In this question on the mailing list two workarounds are given, both retrieving the info from zookeeper, via api call or parsing html response to a get.
Here are the two workarounds:
ZK client API you could just do a get_children on the zk node /collections/ to get all collections.
without ZK client API point this url at your solrCloud install
href="http://host:port/solr/zookeeper?detail=true&path=%2Fcollections
you should be looking for children under the collections node.