スパンまたはクエリ
そのスパン条項の和集合に一致します。以下は例です:
Python
resp = client.search(
query={
"span_or": {
"clauses": [
{
"span_term": {
"field": "value1"
}
},
{
"span_term": {
"field": "value2"
}
},
{
"span_term": {
"field": "value3"
}
}
]
}
},
)
print(resp)
Ruby
response = client.search(
body: {
query: {
span_or: {
clauses: [
{
span_term: {
field: 'value1'
}
},
{
span_term: {
field: 'value2'
}
},
{
span_term: {
field: 'value3'
}
}
]
}
}
}
)
puts response
Js
const response = await client.search({
query: {
span_or: {
clauses: [
{
span_term: {
field: "value1",
},
},
{
span_term: {
field: "value2",
},
},
{
span_term: {
field: "value3",
},
},
],
},
},
});
console.log(response);
コンソール
GET /_search
{
"query": {
"span_or" : {
"clauses" : [
{ "span_term" : { "field" : "value1" } },
{ "span_term" : { "field" : "value2" } },
{ "span_term" : { "field" : "value3" } }
]
}
}
}
clauses
要素は、1つ以上の他のスパンタイプのクエリのリストです。