Span term query
Matches spans containing a term. The span term query maps to Lucene SpanTermQuery. Here is an example:
GET /_search
{
"query": {
"span_term" : { "user.id" : "kimchy" }
}
} A boost can also be associated with the query:
GET /_search
{
"query": {
"span_term" : { "user.id" : { "value" : "kimchy", "boost" : 2.0 } }
}
} Or :
GET /_search
{
"query": {
"span_term" : { "user.id" : { "term" : "kimchy", "boost" : 2.0 } }
}
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-span-term-query.html