es针对字段的模糊查询

参考

https://segmentfault.com/a/1190000004428116

query_string

{
    "query": {
        "query_string": {
             "query":"globalVar",
             "fields":["dataJson"],
              "use_dis_max":true
        }
    }, 
    "sort": [
        {
            "timeStamp": {
                "order": "desc"
            }
        }
    ]
}

针对变量的模糊搜索

post
http://192.168.99.100:9200/event_log/_search

{
    "query": {
        "fuzzy": {
            "dataJson": "golbalVar"
        }
    }, 
    "sort": [
        {
            "timeStamp": {
                "order": "desc"
            }
        }
    ]
}

你可能感兴趣的:(es针对字段的模糊查询)