Given following document
{
"colours": ["red", "yellow", "blue"]
}
I want to perfom a query that filters by "red" but I don't want document that has "yellow" even if it has "red".
This is the following query I'm performing:
{
"query": {
"bool": {
"must_not": [
{
"terms": {
"colours": [
"yellow"
]
}
}
],
"filter": [
{
"terms": {
"colours": [
"red"
]
}
}
]
}
}
}
This query is still giving me documents with "yellow" in them.