Wildcard queries in field name

前端 未结 1 1784
日久生厌
日久生厌 2020-12-30 12:41

I can use simple wildcard query like this:

\"wildcard\" : { \"user\" : \"ki*y\" }

but if i want to use wildcard in field, then what? How sh

相关标签:
1条回答
  • 2020-12-30 12:54

    You can use query_string which allows both field names wildcards and query text wildcards.

    Something around these lines:

    {
      "query": {
        "query_string": {
          "fields": [
            "base*"
          ],
          "query": "ki*y"
        }
      }
    }
    
    0 讨论(0)
提交回复
热议问题