WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Span Not Query Usage
editSpan Not Query Usage
editFluent DSL example
editq .SpanNot(sn => sn .Name("named_query") .Boost(1.1) .Dist(12) .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, Dist = 12, 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, "dist": 12 } }