Span term query
Span term query
Matches spans containing a term. Here is an example:
resp = client.search(
query={
"span_term": {
"user.id": "kimchy"
}
},
)
print(resp)
response = client.search(
body: {
query: {
span_term: {
'user.id' => 'kimchy'
}
}
}
)
puts response
const response = await client.search({
query: {
span_term: {
"user.id": "kimchy",
},
},
});
console.log(response);
GET /_search
{
"query": {
"span_term" : { "user.id" : "kimchy" }
}
}
A boost can also be associated with the query:
resp = client.search(
query={
"span_term": {
"user.id": {
"value": "kimchy",
"boost": 2
}
}
},
)
print(resp)
response = client.search(
body: {
query: {
span_term: {
'user.id' => {
value: 'kimchy',
boost: 2
}
}
}
}
)
puts response
const response = await client.search({
query: {
span_term: {
"user.id": {
value: "kimchy",
boost: 2,
},
},
},
});
console.log(response);
GET /_search
{
"query": {
"span_term" : { "user.id" : { "value" : "kimchy", "boost" : 2.0 } }
}
}
Or :
resp = client.search(
query={
"span_term": {
"user.id": {
"term": "kimchy",
"boost": 2
}
}
},
)
print(resp)
response = client.search(
body: {
query: {
span_term: {
'user.id' => {
term: 'kimchy',
boost: 2
}
}
}
}
)
puts response
const response = await client.search({
query: {
span_term: {
"user.id": {
term: "kimchy",
boost: 2,
},
},
},
});
console.log(response);
GET /_search
{
"query": {
"span_term" : { "user.id" : { "term" : "kimchy", "boost" : 2.0 } }
}
}
当前内容版权归 elasticsearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 elasticsearch .