> 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-first-cha-xun.md).

# Span First 查询

匹配跨越一个字段的开头。跨度第一个查询映射到Lucene SpanFirstQuery。这是一个例子：

```
GET /_search
{
    "query": {
        "span_first" : {
            "match" : {
                "span_term" : { "user" : "kimchy" }
            },
            "end" : 3
        }
    }
}
```

匹配子句可以是任何其他span类型查询。结束控制匹配中允许的最大终点位置。
