solr JOIN query

Posted by Sfairas on Stack Overflow See other posts from Stack Overflow or by Sfairas
Published on 2010-04-14T10:37:30Z Indexed on 2010/04/14 10:43 UTC
Read the original article Hit count: 694

Filed under:
|
|

I need to run a JOIN query on a solr index. I've got two xmls that I have indexed, person.xml and subject.xml.

Person:

<doc>
<field name="id">P39126</field>
<field name="family">Smith</field>
<field name="given">John</field>
<field name="subject">S1276</field>
<field name="subject">S1312</field>
</doc>

Subject:

<doc>
<field name="id">S1276</field>
<field name="topic">Abnormalities, Human</field>
</doc>

I need to only display information from the person doc but each query should match fields in both person and subject. In the case the query matches only the subject doc I need to display all docs from the person that have a matching id. Is this possible to do without running two seperate queries? Something like a JOIN query would do the job.

Any help?

© Stack Overflow or respective owner

Related posts about solr

Related posts about join