Curious about query differences

Just wondering why these two queries give different results. Hoping someone can explain.

The one that works
{
"query": {
"bool": {
"must_not": {
"nested": {
"path": "breadcrumbs",
"query": {
"exists": {
"field": "breadcrumbs"
}
}
}
}
}
}
}

and

The one that doesnt
{
"query":{
"nested":{
"path":"breadcrumbs",
"query":{
"bool":{
"must_not":[
{
"exists":{
"field":"breadcrumbs"
}
}
]
}
}
}
}
}

please take some time to write a full blown reproducible example, but also write down what your expectations are? What do you expect when you query for a field, and the inside query is not to exist for this field? Which documents should match that and which should not?

Thanks for helping!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.