Thanks both for your responses. I am on Solr 8.10.1 and I found that as far as I define any field multivalued. It doesn´t work. I tried using both multivalue with no luck.
Hey Ron. You mentioned it works with multivalued fields. What Solr version are you using? Can you confirm that please and maybe give a bit more info? Thanks a lot Sergio On Thu, 27 Apr 2023 at 20:29, Mikhail Khludnev <m...@apache.org> wrote: > Hi. With regards to having multi-valued fromField > > > org.apache.solr.search.join.CrossCollectionJoinQuery.CrossCollectionJoinQueryWeight#createCloudSolrStream > requests export handler with sort by fromField > > params.set(CommonParams.FL, fromField); > params.set(CommonParams.SORT, fromField + " asc"); > params.set(CommonParams.QT, "/export"); > > However, the export handler doesn't sort by mv field > https://solr.apache.org/guide/8_9/exporting-result-sets.html#specifying-the-sort-criteria > So, there should be an error somewhere. > > > On Thu, Apr 27, 2023 at 8:48 PM Ron Haines <mickr...@gmail.com> wrote: > >> For what it's worth, I have recently used the cross collection join. I >> did >> make sure that the 2 fields were defined the same, as far as both being >> 'multi-value'. Although, I am not certain that is a requirement. >> >> Now, the other thing I ran into is that my 'documents' collection was >> sharded, say across 5 shards. But, my 'person' collection was on a single >> shard. I came to realize that the only time the join was working was for >> the 'documents' collection documents, that were on the same shard as the >> 'person' collection. My 'person' collection was quite small. So, to >> address this, I simply replicated my 'person' collection across all 5 >> shards. >> >> I'm still in the process of 'certifying' if what I described is >> actually behaving the way I think it should. So far, so good. >> >> Ron Haines >> >> On Thu, Apr 27, 2023 at 9:53 AM Sergio García Maroto <marot...@gmail.com> >> wrote: >> >> > Hi, >> > >> > I am trying to use crossCollection join to be able to use sharding. >> > I am joining to collections Person and documents. Finding people with >> > documetns of type pdf. Just realised no people comes back >> > and noticed PersonID in document core is multivalue field. >> > >> > <field name="PersonID" type="string" indexed="true" stored="true" >> > docValues= >> > "true" multiValued="true" /> >> > >> > My query looks like >> > {!join method=crossCollection from=PersonID to=PersonID >> fromIndex=document >> > v='type:(pdf)'} >> > >> > Is this feature not working on multivalue fields? Is there any other >> > option? >> > >> > Regards >> > Sergio Maroto >> > >> > > > -- > Sincerely yours > Mikhail Khludnev > https://t.me/MUST_SEARCH > A caveat: Cyrillic! >