mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
Improvement includes: 1. Remove reference to Lucene queries (this information is not necessary for Elastic users, and can be outdated) 2. For `span_field_masking` include a node to use "require_field_match" : false parameter for highlighters to work. Closes #101804
34 lines
813 B
Text
34 lines
813 B
Text
[[query-dsl-span-containing-query]]
|
|
=== Span containing query
|
|
++++
|
|
<titleabbrev>Span containing</titleabbrev>
|
|
++++
|
|
|
|
Returns matches which enclose another span query. Here is an example:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
|
|
The `big` and `little` clauses can be any span type query. Matching
|
|
spans from `big` that contain matches from `little` are returned.
|