### 案例1: 中文搜索查找关键字 ~~~json GET /es-hmsjorder-info/EsHmsjOrderInfo/_search{  "query": {    "bool": {      "must": {        "term": {          "CertChannel.keyword": "9000000020073774"        }      }    }  }} ~~~ ### [](http://127.0.0.1:3334/mdEditor/#%E6%A1%88%E4%BE%8B2%E5%A4%9A%E4%B8%AA%E6%9D%A1%E4%BB%B6-and-%E5%86%85%E5%AE%B9%E6%9F%A5%E6%89%BE)案例2:多个条件 AND 内容查找 ~~~json GET /es-hmsjorder-info/_search{  "query": {    "bool": {      "must": [        {          "term": {            "Channel": 9          }        },        {          "term": {            "OrderStatus": 1          }        }      ]    }  }} ~~~ ### [](http://127.0.0.1:3334/mdEditor/#%E6%A1%88%E4%BE%8B3%E6%95%B0%E6%8D%AE%E6%8C%87%E5%AE%9A%E6%9D%A1%E4%BB%B6%E6%9B%B4%E6%96%B0%E6%93%8D%E4%BD%9C)案例3:数据指定条件更新操作 ~~~json POST /es-hmsjorder-info/EsHmsjOrderInfo/_update_by_query{  "query": {    "bool": {      "must": {        "term": {          "UserOrderStatus": 3        }      }    }  },  "script": {    "source": "ctx._source['UserOrderStatus'] = 2"  }} ~~~ ### [](http://127.0.0.1:3334/mdEditor/#%E6%A1%88%E4%BE%8B4%E6%9F%A5%E6%89%BE%E8%B6%85%E8%BF%8710000%E6%9D%A1%E8%AE%B0%E5%BD%95)案例4:查找超过10000条记录 `"track_total_hits":true` ~~~json GET /es-user-info/_search{  "query": {    "bool": {      "must": [        {          "term": {            "Activitie": 53          }        }      ]    }  },  "track_total_hits":true} ~~~ ### [](http://127.0.0.1:3334/mdEditor/#%E6%A1%88%E4%BE%8B5%E9%99%90%E5%AE%9A%E8%8C%83%E5%9B%B4%E5%A4%A7%E5%B0%8F%E6%9F%A5%E6%89%BE%E5%86%85%E5%AE%B9)案例5:限定范围大小查找内容 `gte`大于等于 `lte`小于等于 ~~~json GET /es-user-info/_search{  "query": {      "range":{        "Activitie":{            "gte":0,            "lte":2        }    }  }} ~~~