Elasticsearch全文搜索

https://www.jianshu.com/p/56cfc972d372
Elasticsearch多字段查询,以下语句是根据指定的值取消订单,查询所有字段出现这一值的数据

GET /auditlog202002/log/_search
{
  "query": {
    "bool": {
            "must": [],
            "filter": [
                {
                    "multi_match": {
                        "type": "best_fields",
                        "query": "取消订单",
                        "lenient": true
                    }
                },
                {
                    "range": {
                        "OrderContent.CreateTime": {
                            "format": "strict_date_optional_time",
                            "gte": "2019-02-13",
                            "lte": "2020-02-13"
                        }
                    }
                }
            ],
            "should": [],
            "must_not": []
        }
  }
}

你可能感兴趣的:(Elasticsearch全文搜索)