span-term-query.asciidoc 756 B

123456789101112131415161718192021222324252627282930
  1. [[query-dsl-span-term-query]]
  2. === Span Term Query
  3. Matches spans containing a term. The span term query maps to Lucene
  4. `SpanTermQuery`. Here is an example:
  5. [source,js]
  6. --------------------------------------------------
  7. {
  8. "span_term" : { "user" : "kimchy" }
  9. }
  10. --------------------------------------------------
  11. A boost can also be associated with the query:
  12. [source,js]
  13. --------------------------------------------------
  14. {
  15. "span_term" : { "user" : { "value" : "kimchy", "boost" : 2.0 } }
  16. }
  17. --------------------------------------------------
  18. Or :
  19. [source,js]
  20. --------------------------------------------------
  21. {
  22. "span_term" : { "user" : { "term" : "kimchy", "boost" : 2.0 } }
  23. }
  24. --------------------------------------------------