Hello, is there a way to get a Term Query and a nested query to work in the same query? As in match the parent doc to this and child doc to something else. I tried this but its only matching the child query:
.Query(f => f
.Bool(b1 => b1
.Must(m1 => m1
.Terms(t => t
.Field(p => p.Username)
.Terms(userlist)
))
.Must(m2 => m2
.Nested(n => n
.Path("notes")
.Query(q2 => q2
.Terms(t => t
.Field(pp => pp.Notes.First().Username)
.Terms(userlist)
)))
)
)
)
The query comes back but its only matching the child docs to my userlist not the parent. I would like to get back all master documents where the user is on the parent doc and in the child docs. Thanks