span-multi-term-query.asciidoc 757 B

123456789101112131415161718192021222324252627282930
  1. [[query-dsl-span-multi-term-query]]
  2. === Span Multi Term Query
  3. The `span_multi` query allows you to wrap a `multi term query` (one of wildcard,
  4. fuzzy, prefix, term, range or regexp query) as a `span query`, so
  5. it can be nested. Example:
  6. [source,js]
  7. --------------------------------------------------
  8. {
  9. "span_multi":{
  10. "match":{
  11. "prefix" : { "user" : { "value" : "ki" } }
  12. }
  13. }
  14. }
  15. --------------------------------------------------
  16. A boost can also be associated with the query:
  17. [source,js]
  18. --------------------------------------------------
  19. {
  20. "span_multi":{
  21. "match":{
  22. "prefix" : { "user" : { "value" : "ki", "boost" : 1.08 } }
  23. }
  24. }
  25. }
  26. --------------------------------------------------