Elasticsearch how to use multi_match with wildcard

后端 未结 5 850
再見小時候
再見小時候 2020-12-13 03:55

I have a User object with properties Name and Surname. I want to search these fields using one query, and I found multi_match in the documentation, but I don\'t

5条回答
  •  醉梦人生
    2020-12-13 04:24

    Similar to suggestion above, but this is simple and worked for me:

    {
    "query": {
        "bool": {
            "must":
            [
                {
                    "wildcard" : { "processname.keyword" : "*system*" }
                },
                {
                    "wildcard" : { "username" : "*admin*" }
                },
                {
                    "wildcard" : { "device_name" : "*10*" }
                }
            ]
        }
    }
    }
    

提交回复
热议问题