Thanks for the help on this issue. It appears to be related to a multi-shard collection. I will either work with a single shard collection or change the way the data is indexed so as to not need a join query.
Thanks On Thu, Jul 20, 2023 at 5:09 AM Mikhail Khludnev <m...@apache.org> wrote: > Hi there, > If we are talking about SolrCloud. Up to 9.2 let to join "from" fully > replicated single shard collection "to" a many shards collection. > Starting from 9.3 Solr can join from many shards to many shards > collections, but route fields should be the fields, which are used in join > query. > AffinityFactoryPlugin.withCollectionShards may be used to collocate > corresponding collection shards. > > On Wed, Jul 19, 2023 at 11:03 PM Ron Haines <mickr...@gmail.com> wrote: > > > Well, that's interesting. I was under the impression that the 'join' > > required the 'joining' docs to be located on the same shard. I'd > actually > > experienced fewer matches with the join, until I made sure the docs to > > 'join to' were located on the same shard as the docs that were doing the > > 'joining'. Maybe I'm confused...it would make my life a bit easier, if > the > > 'same shard' requirement were not necessary. > > > > Ron Haines > > > > On Wed, Jul 19, 2023 at 3:11 PM Charles Sanders <csand...@redhat.com> > > wrote: > > > > > Thanks for the reply Ron. You bring up a good question and something I > > > need to consider. However in the solr 7 system the records are not on > > the > > > same shard. They are spread across 2 shards. > > > > > > Currently I'm working on a small test instance so I know exactly what > > data > > > I have. I will investigate the multiple shards question. > > > > > > Thanks > > > > > > On Wed, Jul 19, 2023 at 2:57 PM Ron Haines <mickr...@gmail.com> wrote: > > > > > > > After your migration, did your documents that should 'join' end up > > > located > > > > on the same shard? I believe that is a requirement. > > > > > > > > Ron Haines > > > > > > > > On Wed, Jul 19, 2023 at 1:04 PM Charles Sanders <csand...@redhat.com > > > > > > wrote: > > > > > > > > > Thanks again Mikhail for your reply. Yes there are absolutely > > matches > > > > for > > > > > the subquery. This query should return 1 result. I'm working off > a > > > > small > > > > > test collection. > > > > > > > > > > Here are the results of a debug. > > > > > > > > > > { > > > > > "responseHeader":{ > > > > > "zkConnected":true, > > > > > "status":0, > > > > > "QTime":3, > > > > > "params":{ > > > > > "q":"{!join from=image_id > > > > > to=image_record_id}(registry:\"registry.access.redhat.com\" AND > > > > > repository:\"rhel6/rhel\" AND published:true)&rows=100&start=0", > > > > > "indent":"true", > > > > > "q.op":"AND", > > > > > "debugQuery":"true", > > > > > "useParams":""}}, > > > > > > > > > > > > > > > > > > > > "response":{"numFound":0,"start":0,"maxScore":0.0,"numFoundExact":true,"docs":[] > > > > > }, > > > > > "debug":{ > > > > > "track":{ > > > > > "rid":"localhost-96", > > > > > "EXECUTE_QUERY":{ > > > > > " > > > > > > > > > > > > > > > http://localhost:7574/solr/rhcc_shard2_replica_n6/|http://localhost:8983/solr/rhcc_shard2_replica_n2/ > > > > > ":{ > > > > > "QTime":"1", > > > > > "ElapsedTime":"2", > > > > > "RequestPurpose":"GET_TOP_IDS,SET_TERM_STATS", > > > > > "NumFound":"0", > > > > > "Response":"{responseHeader={zkConnected=true, status=0, > > > > > QTime=1, params={df=text, distrib=false, qt=select, debug=[false, > > > > > timing, track], fl=[id, score], shards.purpose=16388, start=0, > > > > > fsv=true, q.op=AND, > > > > > shard.url= > > > > > > > > > > > > > > > http://localhost:7574/solr/rhcc_shard2_replica_n6/|http://localhost:8983/solr/rhcc_shard2_replica_n2/ > > > > > , > > > > > rows=10, rid=localhost-96, version=2, q={!join from=image_id > > > > > to=image_record_id}(registry:\"registry.access.redhat.com\" AND > > > > > repository:\"rhel6/rhel\" AND published:true)&rows=100&start=0, > > > > > omitHeader=false, requestPurpose=GET_TOP_IDS,SET_TERM_STATS, > > > > > NOW=1689786155982, isShard=true, wt=javabin, debugQuery=false, > > > > > useParams=}}, > > > > > > > response={numFound=0,numFoundExact=true,start=0,maxScore=0.0,docs=[]}, > > > > > sort_values={}, debug={join={{!join from=image_id > > > > > to=image_record_id}+(+registry:registry.access.redhat.com > > > > > +repository:rhel6/rhel +published:T) > +text:&rows=100&start=0={time=0, > > > > > fromSetSize=0, toSetSize=0, fromTermCount=0, fromTermTotalDf=0, > > > > > fromTermDirectCount=0, fromTermHits=0, fromTermHitsTotalDf=0, > > > > > toTermHits=0, toTermHitsTotalDf=0, toTermDirectCount=0, > > > > > smallSetsDeferred=0, toSetDocsAdded=0}}, timing={time=1.0, > > > > > prepare={time=0.0, query={time=0.0}, facet={time=0.0}, > > > > > facet_module={time=0.0}, mlt={time=0.0}, highlight={time=0.0}, > > > > > stats={time=0.0}, expand={time=0.0}, terms={time=0.0}, > > > > > debug={time=0.0}}, process={time=0.0, query={time=0.0}, > > > > > facet={time=0.0}, facet_module={time=0.0}, mlt={time=0.0}, > > > > > highlight={time=0.0}, stats={time=0.0}, expand={time=0.0}, > > > > > terms={time=0.0}, debug={time=0.0}}}}}"}, > > > > > " > > > > > > > > > > > > > > > http://localhost:8983/solr/rhcc_shard1_replica_n1/|http://localhost:7574/solr/rhcc_shard1_replica_n4/ > > > > > ":{ > > > > > "QTime":"0", > > > > > "ElapsedTime":"2", > > > > > "RequestPurpose":"GET_TOP_IDS,SET_TERM_STATS", > > > > > "NumFound":"0", > > > > > "Response":"{responseHeader={zkConnected=true, status=0, > > > > > QTime=0, params={df=text, distrib=false, qt=select, debug=[false, > > > > > timing, track], fl=[id, score], shards.purpose=16388, start=0, > > > > > fsv=true, q.op=AND, > > > > > shard.url= > > > > > > > > > > > > > > > http://localhost:8983/solr/rhcc_shard1_replica_n1/|http://localhost:7574/solr/rhcc_shard1_replica_n4/ > > > > > , > > > > > rows=10, rid=localhost-96, version=2, q={!join from=image_id > > > > > to=image_record_id}(registry:\"registry.access.redhat.com\" AND > > > > > repository:\"rhel6/rhel\" AND published:true)&rows=100&start=0, > > > > > omitHeader=false, requestPurpose=GET_TOP_IDS,SET_TERM_STATS, > > > > > NOW=1689786155982, isShard=true, wt=javabin, debugQuery=false, > > > > > useParams=}}, > > > > > > > response={numFound=0,numFoundExact=true,start=0,maxScore=0.0,docs=[]}, > > > > > sort_values={}, debug={join={{!join from=image_id > > > > > to=image_record_id}+(+registry:registry.access.redhat.com > > > > > +repository:rhel6/rhel +published:T) > +text:&rows=100&start=0={time=0, > > > > > fromSetSize=0, toSetSize=0, fromTermCount=3, fromTermTotalDf=3, > > > > > fromTermDirectCount=3, fromTermHits=0, fromTermHitsTotalDf=0, > > > > > toTermHits=0, toTermHitsTotalDf=0, toTermDirectCount=0, > > > > > smallSetsDeferred=0, toSetDocsAdded=0}}, timing={time=0.0, > > > > > prepare={time=0.0, query={time=0.0}, facet={time=0.0}, > > > > > facet_module={time=0.0}, mlt={time=0.0}, highlight={time=0.0}, > > > > > stats={time=0.0}, expand={time=0.0}, terms={time=0.0}, > > > > > debug={time=0.0}}, process={time=0.0, query={time=0.0}, > > > > > facet={time=0.0}, facet_module={time=0.0}, mlt={time=0.0}, > > > > > highlight={time=0.0}, stats={time=0.0}, expand={time=0.0}, > > > > > terms={time=0.0}, debug={time=0.0}}}}}"}}}, > > > > > "join":{ > > > > > "{!join from=image_id > > > > > to=image_record_id}+(+registry:registry.access.redhat.com > > > > > +repository:rhel6/rhel +published:T) +text:&rows=100&start=0":{ > > > > > "time":0, > > > > > "fromSetSize":0, > > > > > "toSetSize":0, > > > > > "fromTermCount":3, > > > > > "fromTermTotalDf":3, > > > > > "fromTermDirectCount":3, > > > > > "fromTermHits":0, > > > > > "fromTermHitsTotalDf":0, > > > > > "toTermHits":0, > > > > > "toTermHitsTotalDf":0, > > > > > "toTermDirectCount":0, > > > > > "smallSetsDeferred":0, > > > > > "toSetDocsAdded":0}}, > > > > > "timing":{ > > > > > "time":1.0, > > > > > "prepare":{ > > > > > "time":0.0, > > > > > "query":{ > > > > > "time":0.0}, > > > > > "facet":{ > > > > > "time":0.0}, > > > > > "facet_module":{ > > > > > "time":0.0}, > > > > > "mlt":{ > > > > > "time":0.0}, > > > > > "highlight":{ > > > > > "time":0.0}, > > > > > "stats":{ > > > > > "time":0.0}, > > > > > "expand":{ > > > > > "time":0.0}, > > > > > "terms":{ > > > > > "time":0.0}, > > > > > "debug":{ > > > > > "time":0.0}}, > > > > > "process":{ > > > > > "time":0.0, > > > > > "query":{ > > > > > "time":0.0}, > > > > > "facet":{ > > > > > "time":0.0}, > > > > > "facet_module":{ > > > > > "time":0.0}, > > > > > "mlt":{ > > > > > "time":0.0}, > > > > > "highlight":{ > > > > > "time":0.0}, > > > > > "stats":{ > > > > > "time":0.0}, > > > > > "expand":{ > > > > > "time":0.0}, > > > > > "terms":{ > > > > > "time":0.0}, > > > > > "debug":{ > > > > > "time":0.0}}}, > > > > > "rawquerystring":"{!join from=image_id > > > > > to=image_record_id}(registry:\"registry.access.redhat.com\" AND > > > > > repository:\"rhel6/rhel\" AND published:true)&rows=100&start=0", > > > > > "querystring":"{!join from=image_id > > > > > to=image_record_id}(registry:\"registry.access.redhat.com\" AND > > > > > repository:\"rhel6/rhel\" AND published:true)&rows=100&start=0", > > > > > "parsedquery":"JoinQuery({!join from=image_id > > > > > to=image_record_id}+(+registry:registry.access.redhat.com > > > > > +repository:rhel6/rhel +published:T) +text:&rows=100&start=0)", > > > > > "parsedquery_toString":"{!join from=image_id > > > > > to=image_record_id}+(+registry:registry.access.redhat.com > > > > > +repository:rhel6/rhel +published:T) +text:&rows=100&start=0", > > > > > "QParser":"", > > > > > "explain":{}}} > > > > > > > > > > > > > > > On Wed, Jul 19, 2023 at 12:50 PM Mikhail Khludnev <m...@apache.org > > > > > > wrote: > > > > > > > > > > > ok. How is the query parsed (debugQuery=true)? Does the subquery > > have > > > > > > matches? > > > > > > > > > > > > On Wed, Jul 19, 2023 at 7:36 PM Charles Sanders < > > csand...@redhat.com > > > > > > > > > > wrote: > > > > > > > > > > > > > Thanks for the reply Mikhail. They are of type String. And > > yes, I > > > > > > > believe I saw that about integers as well. > > > > > > > > > > > > > > Thanks, > > > > > > > Charles > > > > > > > > > > > > > > On Wed, Jul 19, 2023 at 12:29 PM Mikhail Khludnev < > > m...@apache.org > > > > > > > > > > wrote: > > > > > > > > > > > > > > > Hello Charles > > > > > > > > What are image_id and image_record_id types? I roughly > remember > > > > some > > > > > > > > mentions in the guide that integers might not be supported. > > > > > > > > > > > > > > > > On Wed, Jul 19, 2023 at 5:09 PM Charles Sanders < > > > > csand...@redhat.com > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > I have an application using Solr 7.7.2. We are upgrading > to > > > Solr > > > > > > > 9.2. I > > > > > > > > > have a join query that works fine in 7.7.2, but returns no > > > > results > > > > > in > > > > > > > > 9.2, > > > > > > > > > It does not return an error, just no results. > > > > > > > > > > > > > > > > > > Any idea as to what I should look at to resolve the > issue? I > > > > don't > > > > > > > know > > > > > > > > if > > > > > > > > > anything changed regarding join queries in 7 to 9. I did > not > > > see > > > > > > > > anything > > > > > > > > > in the documentation. > > > > > > > > > > > > > > > > > > My query is: > > > > > > > > > q={!join from=image_id to=image_record_id}(registry:" > > > > > > > > > registry.access.redhat.com" AND repository:"rhel6/rhel" > AND > > > > > > > > > published:true)&rows=100&start=0 > > > > > > > > > > > > > > > > > > Any help is greatly appreciated. > > > > > > > > > -Charles > > > > > > > > > > > > > > > > > > Wyrd bið ful aræd > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Sincerely yours > > > > > > > > Mikhail Khludnev > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Sincerely yours > > > > > > Mikhail Khludnev > > > > > > > > > > > > > > > > > > > > > > > -- > Sincerely yours > Mikhail Khludnev >