I want to get the results that do not match "statusCode": 200
In order to match text from field you use
GET index01/_search?pretty
{
"query":{
"match":{
"statusCode": 200
}
}
}
I tried something like this:
GET ucs_heartbeat/_search?pretty
{
"query":{
"match":{
"statusCode":{
"query": 200,
"operator": "must_not"
}
}
}
}
According to: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
must_not
formatch query
. Only available operators areand
(default) andor
. Consider usingterm
query overmatch
query for all structured fields likekeyword, numbers
- avr