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 danosth <da...@gmail.com> on 2013/11/05 18:14:14 UTC

Nested documents/Block Join query

Hi

I've been trying to play around with block join queries in the Solr 4.5
release and I was wondering if anyone else has any experience doing this?
Basically I'm trying to create a parent->child->grandchild structure and
then query to retrieve the parent documents. I can kinda get it to work on
the child level (I think):

{!parent which='type_s:parent' v='field1:"value1" AND field2:"value2"'} -
will retrieve all parent documents where the criteria matches field1 and
field 2 within one child document

{!parent which='type_s:parent' v='field1:"value1"'} AND {!parent
which='type_s:parent' v='field2:"value2"'} - will retrieve all parent
documents where criteria are met across any child documents

How do I query on the grandchild level though? 

If I set the same type_s field for each level and try to do something like
{!parent which='type_s:child' v='grandchildfield:value1'} it will return the
correct child document, how do I relate that back to the parent though?



--
View this message in context: http://lucene.472066.n3.nabble.com/Nested-documents-Block-Join-query-tp4099439.html
Sent from the Solr - User mailing list archive at Nabble.com.