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

# Span Containing 查询

返回包含另一个span查询的匹配项。包含查询的跨度映射到Lucene SpanContainingQuery。这是一个例子：

```
GET /_search
{
    "query": {
        "span_containing" : {
            "little" : {
                "span_term" : { "field1" : "foo" }
            },
            "big" : {
                "span_near" : {
                    "clauses" : [
                        { "span_term" : { "field1" : "bar" } },
                        { "span_term" : { "field1" : "baz" } }
                    ],
                    "slop" : 5,
                    "in_order" : true
                }
            }
        }
    }
}
```

`big` 和 `little`的子句可以是任何span类型查询。在包含little匹配中从big匹配跨度返回。
