Here's my current query, which is returning 100 results, instead of 99.
{
"query": {
"bool": {
"filter": [
{
"nested": {
"path": "properties",
"query": {
"bool": {
"filter": [
{
"match": {
"properties.key": "keyToInclude"
}
},
{
"match": {
"properties.value": "valueToInclude"
}
}
],
"must_not": [
{
"match": {
"properties.key": "keyToExclude"
}
}
]
}
}
}
}
]
}
}
}
There's one document which has the property key "keysToExclude", which is a nested object inside the properties array.
Why is it not excluding that one document? Is my structure wrong or should I not use match inside must_not or something else?
Thanks!