elasticsearch/docs/reference/query-dsl/span-term-query.asciidoc
Mayya Sharipova d6c53e03d2
Improve span queries documentation (#103490)
Improvement includes:
1. Remove reference to Lucene queries (this information is not necessary
for Elastic users, and can be outdated)
2. For `span_field_masking` include a node to use
"require_field_match" : false parameter for highlighters to work.

Closes #101804
2023-12-19 14:51:19 -05:00

41 lines
853 B
Text

[[query-dsl-span-term-query]]
=== Span term query
++++
<titleabbrev>Span term</titleabbrev>
++++
Matches spans containing a term. Here is an example:
[source,console]
--------------------------------------------------
GET /_search
{
"query": {
"span_term" : { "user.id" : "kimchy" }
}
}
--------------------------------------------------
A boost can also be associated with the query:
[source,console]
--------------------------------------------------
GET /_search
{
"query": {
"span_term" : { "user.id" : { "value" : "kimchy", "boost" : 2.0 } }
}
}
--------------------------------------------------
Or :
[source,console]
--------------------------------------------------
GET /_search
{
"query": {
"span_term" : { "user.id" : { "term" : "kimchy", "boost" : 2.0 } }
}
}
--------------------------------------------------