You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Span First Query Usageedit
Fluent DSL Exampleedit
q
.SpanFirst(c => c
.Name("named_query")
.Boost(1.1)
.Match(sq=>sq
.SpanTerm(st=>st.Field(p=>p.Name).Value("value"))
)
.End(3)
)Object Initializer Syntax Exampleedit
new SpanFirstQuery
{
Name = "named_query",
Boost = 1.1,
End = 3,
Match = new SpanQuery
{
SpanTerm = new SpanTermQuery { Field = "name", Value = "value" }
}
}Example json output.
{
"span_first": {
"_name": "named_query",
"boost": 1.1,
"match": {
"span_term": {
"name": {
"value": "value"
}
}
},
"end": 3
}
}