mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 18:03:32 -04:00
This allows the RegexpQueryBuilder to be used in span queries Added tests for all span multi term queries. Also updated the documentation and removed mentioning of numeric range queries for span queries (they have to be terms). Closes #3392
30 lines
746 B
Text
30 lines
746 B
Text
[[query-dsl-span-multi-term-query]]
|
|
=== Span Multi Term Query
|
|
|
|
The `span_multi` query allows you to wrap a `multi term query` (one of
|
|
fuzzy, prefix, term range or regexp query) as a `span query`, so
|
|
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 } }
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|