Span term query

Matches spans containing a term. The span term query maps to Lucene SpanTermQuery. Here is an example:

  1. GET /_search
  2. {
  3. "query": {
  4. "span_term" : { "user.id" : "kimchy" }
  5. }
  6. }

A boost can also be associated with the query:

  1. GET /_search
  2. {
  3. "query": {
  4. "span_term" : { "user.id" : { "value" : "kimchy", "boost" : 2.0 } }
  5. }
  6. }

Or :

  1. GET /_search
  2. {
  3. "query": {
  4. "span_term" : { "user.id" : { "term" : "kimchy", "boost" : 2.0 } }
  5. }
  6. }