1)
has child query: 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-has-child-query.html

2)
has parent query: 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-has-parent-query.html

3)
has parent query + exists filter on parent type

4)
has child query + exists filter on child type

Check 
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/relations.html

/JZ

On Wednesday, January 14, 2015 at 7:51:47 AM UTC+1, buddarapu nagaraju 
wrote:
>
> Hi,
> I have question on document relations
>
> one document can have multiple child's. and now I have to address below 
> searches and achieve the mentioned expected results .
>
> 1)
> search on any child documents(meaning have a query that qualifies child 
> documents) and retrieve the child ,parent and all of the child's of the 
> parents
>
> 2)
>
> search on any parent documents and retrieve parent and all of the child 
> documents
>
> 3) search on any parent documents and just retrieve only qualified parent 
> documents
>
> 4) search on any child documents and just retrieve only qualified child 
> documents
>
> Is there any existing feature that help in achieving this ? any ideas 
> /thoughts would be very useful ?
> also please provide some sample code if possible
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/294eaab3-7d6d-455e-98fc-c79466d59fce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to