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 Pranaya Behera <pr...@igp.com> on 2016/06/14 09:27:29 UTC

Filter query wrt main query on block join

Hi,
      I have indexed nested documents into solr.
How do I filter on the main query using block join query?
Here is what I have in the sense of documents:
Document A -> id, name, title, is_parent=true
Document B -> id, x,y,z
Document C -> id, a , b
Document B & C are child to A. I want to get all the parent which 
children has x and y. So the main query becomes:
q={!parent which="is_parent:true"}x:"Some string" y:"Some other string"

Now I want to filter on the result set of the previous query on how many 
parent has children a.
Is fq={!parent which="is_parent:true"}a:"Specific String" along with the 
q i.e. specified above is correct ?

The main query i.e. "q" is it correct in terms of syntax. If not how can 
I improve that?
What would be a correct "fq" for filtering the resultset based on the 
children the resultset's each document has ?