You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by marotosg <ma...@gmail.com> on 2013/09/23 16:31:58 UTC

Complez query combining fq and q with join

Hi all,Thanks in advance for your help.I am trying to create a query joining
two cores using {!join}  functionality.I have two cores, "personcore" and
"personjobcore". *Person core schema*PersonIDGenderAge*Company core
schema*PersonJobIDPersonIDCompanyNameCompanyTypeAddressI have to create a
complex query like this one joining both cores and getting results only from
Person.*(Gender:Male AND Company:IBM AND CompanyType:All) OR (Gender:Female
AND Address:United States)*I am finding really hard to create this query
using {!join} as I have to define several join sentences and using boolean
operator within them.Is that possible?This an example what I am
tryinghttp://localhost:8080/solr4/person/select/?&q=Gender:Male AND {!join
from=PersonID to=PersonID fromIndex=personjob}((CoCompanyName:ibm) AND 
(CompanyType:All))



--
View this message in context: http://lucene.472066.n3.nabble.com/Complez-query-combining-fq-and-q-with-join-tp4091563.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Complex query combining fq and q with join

Posted by marotosg <ma...@gmail.com>.
I found the solution.


http://dzoessolr020:8080/solr4/person/select/?
&q= 
(
( ( GenderSFD:Male )
AND {!join from=PersonID to=CoreID fromIndex=personjob
v='((CoCompanyName:"hospital") OR (PoPositionsAllS:"developer"))'} 

AND {!join from=DocPersonAttachS to=CoreID fromIndex=document v='(DocNameS:"
PeterRES")'} 
)





--
View this message in context: http://lucene.472066.n3.nabble.com/Complex-query-combining-fq-and-q-with-join-tp4091563p4091725.html
Sent from the Solr - User mailing list archive at Nabble.com.