mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 13:38:49 +00: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
31 lines
746 B
Plaintext
31 lines
746 B
Plaintext
[[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 } }
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|