filter by matching parent & specific child in nested documents

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

filter by matching parent & specific child in nested documents

javashankar
This post has NOT been accepted by the mailing list yet.
Hi All

I have documents (nested) in the following structure
dept1 - [emp1, emp2, emp3] & dept2 [emp4, emp5, emp6]
given emp2 as input, i want to fetch - dept1[emp2] only but it is fetching all children of matching parent dept1 - [emp1, emp2, emp3]

Please help me understand, where i'm going wrong. Is this expected behavior or do we have an approach to filter matching parent & child ?