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 danost <da...@hotmail.com> on 2013/11/07 12:00:54 UTC

Block join query

Sorry about the reposts here, but I can't seem to get on the mailing list...

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?




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