IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Span Not Query Usage
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Span Not Query Usage
editFluent DSL example
editq
.SpanNot(sn => sn
.Name("named_query")
.Boost(1.1)
.Post(13)
.Pre(14)
.Include(i => i
.SpanTerm(st => st.Field("field1").Value("hoya"))
)
.Exclude(e => e
.SpanTerm(st => st.Field("field1").Value("hoya2"))
)
)
Object Initializer syntax example
editnew SpanNotQuery
{
Name = "named_query",
Boost = 1.1,
Post = 13,
Pre = 14,
Include = new SpanQuery
{
SpanTerm = new SpanTermQuery
{
Field = "field1", Value = "hoya"
}
},
Exclude = new SpanQuery
{
SpanTerm = new SpanTermQuery
{
Field = "field1", Value = "hoya2"
}
},
}
Example json output.
{
"span_not": {
"_name": "named_query",
"boost": 1.1,
"include": {
"span_term": {
"field1": {
"value": "hoya"
}
}
},
"exclude": {
"span_term": {
"field1": {
"value": "hoya2"
}
}
},
"pre": 14,
"post": 13
}
}