Elasticsearch query must not match text from field

前端 未结 1 2221
星月不相逢
星月不相逢 2021-02-20 10:53

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\":{
            


        
1条回答
  •  情话喂你
    2021-02-20 11:25

    Try this instead

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

    0 讨论(0)
提交回复
热议问题