2013-08-28 19:24:34 -04:00
|
|
|
[[query-dsl-span-multi-term-query]]
|
|
|
|
=== Span Multi Term Query
|
|
|
|
|
2015-02-05 15:23:52 -05:00
|
|
|
The `span_multi` query allows you to wrap a `multi term query` (one of wildcard,
|
2015-02-24 13:44:51 -05:00
|
|
|
fuzzy, prefix, term, range or regexp query) as a `span query`, so
|
2013-08-28 19:24:34 -04:00
|
|
|
it can be nested. Example:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"span_multi":{
|
|
|
|
"match":{
|
|
|
|
"prefix" : { "user" : { "value" : "ki" } }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
A boost can also be associated with the query:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"span_multi":{
|
|
|
|
"match":{
|
|
|
|
"prefix" : { "user" : { "value" : "ki", "boost" : 1.08 } }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|