> For the complete documentation index, see [llms.txt](https://xiaoxiami.gitbook.io/elasticsearch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xiaoxiami.gitbook.io/elasticsearch/ji-chu/35query-dsldslfang-shi-cha-8be229/354zhu-yu-ji-bie-cha-8be228-term-level-queries/wildcard-cha-8be228-tong-pei-fu-cha-8be229.md).

# Wildcard 查询(通配符查询)

匹配与通配符表达式具有匹配字段的文档（**not analyzed**）。支持的通配符是 “\*”，它匹配任何字符序列（包括空字符）；还有 “？”，它匹配任何单个字符。请注意，此查询可能很慢，因为它需要迭代多个项。为了防止极慢的通配符查询，通配符项不应以通配符 “\*” 或 “？” 开头。通配符查询对应**Lucene**的**WildcardQuery** 。

```
GET /_search
{
    "query": {
        "wildcard" : { "user" : "ki*y" }
    }
}
```

&#x20;*boost*也可以与查询相关联：

```
GET /_search
{
    "query": {
        "wildcard" : { "user" : { "value" : "ki*y", "boost" : 2.0 } }
    }
}
```

或者这样：

```
GET /_search
{
    "query": {
        "wildcard" : { "user" : { "wildcard" : "ki*y", "boost" : 2.0 } }
    }
}
```

此多项查询允许如何控制使用*rewrite*参数重写。
