I have to fetch records from items index with condition that either of fields 'name' or 'description' contains 'refrigerator', but field status doesn't contain '-wip'. I have written query as:
GET items/_search
{
"query": {
"bool": {
"must": {
"multi_match": {
"operator": "or",
"fields": [
"name",
"description"
],
"query": "refrigerator"
}
},
"filter": {
"match": {
"status": [
"-wip"
]
}
}
}
}
}
But it gives me error:
failed to parse field [filter]
Seems "match" doesn't work.
How can I fetch compatible items?