Muthu kader
Muthu kader

Reputation: 119

join multicore in solr

Hi,

I am new to Solr4.3,I don't know how to use JOIN query in solr,after I read different article,i get some solution,but still its not give a correct result.

My Requirement:

This is my SQL query..SELECT MAX(A.LoadID) FROM QUESTINORE A ,LOAD B WHERE A.SourceID= 1 AND A.DataStreamSubType=34sdf AND A.LoadID =B.LoadID AND B.Success='1' , I have to convert this to Solr query,I tried my self,but didn't get a correct result,

My first core QUESTINORE whole result from solr admin is,

     <doc>
        <str name="ID"> Muthu56 </str>
        <long name="SourceID">1</long>
        <long name="LoadID">381</long>
        <str name="DataStreamType">sdfsfd</str>
        <str name="DataStreamSubType">34sdf</str>
        <long name="EventID">2</long>
        </doc>

And my second LOAD core result from admin is,

    <doc>
    <long name="LoadID">381</long>
    <long name="SourceID">1</long>
    <str name="DataStreamType">QUESTIONNAIRE</str>
    <long name="Success">1</long>
    <str name="_version_">1435736380162441216</str></doc>
    </doc>

And this is my solr query,i didn't get the result from this query

In solr admin i put this in SourceID:1 AND DataStreamSubType:34sdf AND {!join from=LoadID to=LoadID fromIndex=Load}Success:1 in fq field and i put LoadID in fl field then i got this URL after click execute Query

Upvotes: 3

Views: 896

Answers (1)

Rick
Rick

Reputation: 53

According to your demand, you can use this url to see if works.

http://localhost:3033/solr/QUESTINORE/select?q={!join from=LoadID+to=LoadID+fromIndex=LOAD}DataStreamSubType:34sdf&fq=SourceID:1

Upvotes: 1

Related Questions