what is the expected behavior for a nested must_not query?
sample query:
{
"query": {
"bool": {
"filter": [
{
"nested": {
"path": "participants",
"inner_hits": {
"name": "participants.1",
"_source": [
"participants.domain"
],
"size": 10
},
"query": {
"bool": {
"must_not": [
{
"term": {
"participants.domain.keyword": {
"value": "TO",
"case_insensitive": true
}
}
}
]
}
}
}
}
]
}
}
}
this query will return results with some "participants"."domain" = "TO", the inner_hit indicates the result meet the search criteria because one of the "participants"."domain" is "FROM".
"_source": {
"participants": [
{
"domain": "TO",
},
{
"domain": "FROM",
}
]
}...
But I would expect none of the "participants"."domain" to be "TO", so any document with "participants"."domain"="TO" should not be returned.