I'm new to Elastic Search and can't find information on how to use not
or must_not
as term filter with elastic search.
My query is set up as follows:
{
"size":4,
"from":0,
"query":{
"bool":{
"filter":[
{
"term":{
"published":1
}
},
{
"term":{
"brand.keyword":"Honda"
}
},
{
"not": {
"term": {
"tags": "Red"
}
}
},
{
"wildcard":{
"image":"*"
}
}
]
}
}
}
But when I test in Postman I get the error:
"type": "parsing_exception",
"reason": "no [query] registered for [not]"
Would anyone know how I could fix this?