es组合多个条件进行查询

GET /test_index/_search
{
  "query": {
    "bool": {
      "must": { "match": { "name": "tom" }},
      "should": [
        { "match": { "hired": true }},
        { "bool": {
          "must": { "match": { "personality": "good" }},
          "must_not": { "match": { "rude": true }}
        }}
      ],
      "minimum_should_match": 1
    }
  }
}

posted @ 2018-03-07 21:36  秦先生的客栈  Views(24420)  Comments(0Edit  收藏  举报