Reputation: 173
Iam using solrcloud 6.2 version, I have two collections, C1 and C2. And Collection C1 has shards C1S1, C1S2 and Collection C2 has shards C2S1, C2S2. Now would like to query C1S1 and C2S1 shards, which are from different collections? Could someone help me in writing select query? Thanks
Upvotes: 3
Views: 1744
Reputation: 52912
As long as the schema between the collections are compatible, you should be able to manually use the shards
parameter in your request:
../select?q=*:*&shards=localhost:7574/solr/c2s1,localhost:8983/solr/c1s1
If the schemas aren't directly compatible, defining a metaschema that combines both and then querying against that is a possible solution. A possible issue here is that if the schemas and documents aren't expressing the same thing, scoring between the shards will be weird.
Upvotes: 5