OpenSearch/docs/reference/query-dsl/span-multi-term-query.asciidoc

39 lines
887 B
Plaintext
Raw Normal View History

[[query-dsl-span-multi-term-query]]
=== Span Multi Term Query
The `span_multi` query allows you to wrap a `multi term query` (one of wildcard,
fuzzy, prefix, term, range or regexp query) as a `span query`, so
it can be nested. Example:
[source,js]
--------------------------------------------------
GET /_search
{
"query": {
"span_multi":{
"match":{
"prefix" : { "user" : { "value" : "ki" } }
}
}
}
}
--------------------------------------------------
// CONSOLE
A boost can also be associated with the query:
[source,js]
--------------------------------------------------
GET /_search
{
"query": {
"span_multi":{
"match":{
"prefix" : { "user" : { "value" : "ki", "boost" : 1.08 } }
}
}
}
}
--------------------------------------------------
// CONSOLE