solrsolrcloud

Does SolrCloud support Join queries between shards?


I have setup a SolrCloud with 2 nodes, 2 shards and 2 replicas. My Join query works fine in a single solr instance and it has some issues with this SolrCloud setup.

fq = {!join from=student_id_i to=student_id_i} sf_meta_class:Students

q = sf_meta_class: Books

I guess mostly the issue is with the Sharding part, since I get nearly(not exactly) half of the result set and not the whole result set. Am I doing anything wrong here? Or the Solr never supported Join queries with multiple shards?

I had tried putting the shards explicitly on the search query like this:

http://localhost:8983/solr/core1/select?shards=solr1:8983/solr/core1,solr2:8983/solr/core1&indent=true&q=ipod+solr

Still it doesn't work for me.

EDIT: Apparently SolrCloud doesn't join queries in Shards. Found it on https://cwiki.apache.org/confluence/display/solr/SolrPerformanceProblems


Solution

  • Unfortunately Solr doesn't support this. An issue has been created, but in the meantime if you can reduce either set of docs to its own collection (for example separate sf_meta_class:Books) Solr does support joining across collections. The caveat there is you need to make sure that the smaller collection is not sharded and is present on each node.