Elasticsearch query must not match text from field -


i want results not match "statuscode": 200

in order match text field use

get index01/_search?pretty {   "query":{     "match":{       "statuscode": 200     }   } } 

i tried 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

try instead

get ucs_heartbeat/_search?pretty {   "query": {     "bool": {       "must_not": [         {           "term": {             "statuscode": 200           }         }       ]     }   } } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -