> 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/358span-cha-xun/span-term-cha-xun.md).

# Span Term 查询

匹配包含术语的跨度。Span Term查询映射到Lucene SpanTermQuery。这是一个例子：

```
GET /_search
{
    "query": {
        "span_term" : { "user" : "kimchy" }
    }
}
```

升级也可以与查询相关联：

```
GET /_search
{
    "query": {
       "span_term" : { "user" : { "value" : "kimchy", "boost" : 2.0 } }
    }
}
```

或者 ：

```
GET /_search
{
    "query": {
        "span_term" : { "user" : { "term" : "kimchy", "boost" : 2.0 } }
    }
}
```
