filter by matching parent & specific child in nested documents
This post has NOT been accepted by the mailing list yet.
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 ?