ELK query

270 阅读1分钟
  1. reference links www.youtube.com/watch?v=C-J…

Elasticsearch and Kibana 介绍 www.youtube.com/watch?v=gS_…

Data is stored as documents Documents are grouped into an index

www.youtube.com/watch?v=kNW…

www.youtube.com/watch?v=UWR…

www.youtube.com/watch?v=e5a…

  1. basic query operations

must == AND should == OR must_not == NOT filter == filter out

  1. nested boolean queries field_A is (A or B) and not (C or D)
{

  "query": {
    "bool": {
      "should": [
        {
          "match": {
            "last_name": "A"
          }
        },
        {
          "match": {
            "last_name": "B"
          }
        }
      ],
      "must_not": [
        {
           "bool": {
             "should": {
                "match": {
                  "about": "c"
                },
                "match": {
                  "about": "D"
                }
             }
           }
           
        }
      ]
    }
  }
}