IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Span Containing Query Usage
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Span Containing Query Usage
editFluent DSL example
editq
.SpanContaining(sn => sn
.Name("named_query")
.Boost(1.1)
.Little(i => i
.SpanTerm(st => st.Field("field1").Value("hoya"))
)
.Big(e => e
.SpanTerm(st => st.Field("field1").Value("hoya2"))
)
)
Object Initializer syntax example
editnew SpanContainingQuery
{
Name = "named_query",
Boost = 1.1,
Little = new SpanQuery { SpanTerm = new SpanTermQuery { Field = "field1", Value = "hoya" } },
Big = new SpanQuery { SpanTerm = new SpanTermQuery { Field = "field1", Value = "hoya2" } },
}
Example json output.
{
"span_containing": {
"_name": "named_query",
"boost": 1.1,
"little": {
"span_term": {
"field1": {
"value": "hoya"
}
}
},
"big": {
"span_term": {
"field1": {
"value": "hoya2"
}
}
}
}
}