包含查询的跨度编辑

返回包含另一个跨度查询的匹配项。以下是一个示例

response = client.search(
  body: {
    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
          }
        }
      }
    }
  }
)
puts response
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
        }
      }
    }
  }
}

biglittle 子句可以是任何跨度类型查询。返回来自 big 的包含来自 little 的匹配项的匹配跨度。