Hi Joel, Below are the results which I am getting.
If I use this query; innerJoin(innerJoin( search(people, q=*:*, fl="personId,name", sort="personId asc"), search(pets, q=type:cat, fl="pertsId,petName", sort="personId asc"), on="personId=petsId" ), search(collection1, q=*:*, fl="collectionId,collectionName", sort="collectionId asc"), )on="petsId=collectionId" I will get this exception error. {"result-set":{"docs":[{"EXCEPTION":"Invalid JoinStream - all incoming stream comparators (sort) must be a superset of this stream's equalitor.","EOF":true}]}} But if I use this query: innerJoin(innerJoin( search(people, q=*:*, fl="personId,name", sort="personId asc"), search(pets, q=type:cat, fl="pertsId,petName", sort="personId asc"), on="personId=petsId" ), search(collection1, q=*:*, fl="collectionId,collectionName", sort="collectionId asc"), )on="personId=collectionId" The query will get stuck, until I get this message. After which, the whole Solr is hanged, and I have to restart Solr to get it working again. This is in Solr 6.5.1. 2017-06-17 03:16:00.916 WARN (zkCallback-8-thread-4-processing-n:192.168.0.1:8983_solr x:collection1_shard1_replica1 s:shard1 c:collection1 r:core_node1-EventThread) [c:collection1 s:shard1 r:core_node1 x:collection1_shard1_replica1] o.a.s.c.c.ConnectionManager Our previous ZooKeeper session was expired. Attempting to reconnect to recover relationship with ZooKeeper... Regards, Edwin On 15 June 2017 at 23:36, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote: > Hi Joel, > > Yes, I got this error: > > {"result-set":{"docs":[{"EXCEPTION":"Invalid JoinStream - all incoming stream > comparators (sort) must be a superset of this stream's > equalitor.","EOF":true}]}} > > > Ok, will try out the work around first. > > Regards, > Edwin > > > On 15 June 2017 at 20:16, Joel Bernstein <joels...@gmail.com> wrote: > >> It looks like you are running into this bug: >> https://issues.apache.org/jira/browse/SOLR-10512. This not been resolved >> yet, but I believe there is a work around which is described in the >> ticket. >> >> Joel Bernstein >> http://joelsolr.blogspot.com/ >> >> On Wed, Jun 14, 2017 at 10:09 PM, Zheng Lin Edwin Yeo < >> edwinye...@gmail.com> >> wrote: >> >> > I have found that this is possible, but currently I have problems if the >> > field name to join in all the 3 collections are different. >> > >> > For example, if in "people" collection, it is called personId, and in >> > "pets" collection, it is called petsId. But in "collectionId", it is >> called >> > collectionName, but it won't work when I place it this way below. Any >> > suggestions on how I can handle this? >> > >> > innerJoin(innerJoin( >> > search(people, q=*:*, fl="personId,name", sort="personId asc"), >> > search(pets, q=type:cat, fl="pertsId,petName", sort="personId asc"), >> > on="personId=petsId" >> > ), >> > search(collection1, q=*:*, fl="collectionId,collectionName", >> > sort="personId asc"), >> > )on="personId=collectionId" >> > >> > >> > Regards, >> > Edwin >> > >> > On 14 June 2017 at 23:13, Zheng Lin Edwin Yeo <edwinye...@gmail.com> >> > wrote: >> > >> > > Hi, >> > > >> > > I'm using Solr 6.5.1. >> > > >> > > Is it possible to have multiple hashJoin or innerJoin in the query? >> > > >> > > An example will be something like this for innerJoin: >> > > >> > > innerJoin(innerJoin( >> > > search(people, q=*:*, fl="personId,name", sort="personId asc"), >> > > search(pets, q=type:cat, fl="personId,petName", sort="personId >> asc"), >> > > on="personId" >> > > ), >> > > search(collection1, q=*:*, fl="personId,personName", sort="personId >> > > asc"), >> > > ) >> > > >> > > Regards, >> > > Edwin >> > > >> > >> > >