lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh <rajesh.panneersel...@aspiresys.com>
Subject Querying parent with multiple child documents
Date Mon, 22 Dec 2014 11:16:59 GMT
Hi,

I've a document which has multiple child documents associated with it and
child documents are from different table(Both contain different fields)
mentioned below. I can query the parent and child document with a OR
condition between these two child records. Is there a way how I can specify
AND condition between the two child records to retrieve the parent?

My sample doc. structure:
<doc>
 <type>Parent</type>
 <id>order1</id>
   <doc>
        <type>child</child>
        <id>product1</id>
        <productname>childproduct</productname>  
  </doc>
  <doc>
      <type>child</child>
      <id>product2</id>
      <orderDetail>childproduct2</orderDetail>
  </doc>
</doc>

OR query between child docs.
fq = {!parent which=\"type:parent\" v=\"productname:childproduct OR
orderDetail:childproduct2\"}
fl = *,[child parentFilter=\"type:parent\"
childFilter=\"productname:childproduct OR orderDetail:childproduct2\"]

How can I get a parent which has both childproduct and childproduct2 but in
different childrens.



--
View this message in context: http://lucene.472066.n3.nabble.com/Querying-parent-with-multiple-child-documents-tp4175546.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message