多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# Span Containing 查询 原文链接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.4/query-dsl-span-containing-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/query-dsl-span-containing-query.html) 译文链接 : [http://www.apache.wiki/pages/viewpage.action?pageId=10029287](http://www.apache.wiki/pages/viewpage.action?pageId=10029287) 贡献者 : [片刻](/display/~jiangzhonglian) [ApacheCN](/display/~apachecn) [Apache中文网](/display/~apachechina) 返回包含另一个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匹配跨度返回。