模糊匹配:

{
  "query": {
    "wildcard": {
        "userName.keyword": "*hello*" # 匹配带 hello 串的用户名
    }
  }
}

正则匹配:

{
  "query": {
      "regexp": {
          "userName.keyword": "[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}" # uuid
      }
    }
}