मदद की जरूरत है.
कैसे करने के लिए क्वेरी में Elasticsearch इस तरह:
SELECT * FROM tableA WHERE
tableA.clm1 IN ('A','B')
AND
(tableA.clm2 IN ('C', 'D') OR tableA.clm3 IN ('E','F'))
OR
tableA.clm4 = 'Z'
धन्यवाद ।
मदद की जरूरत है.
कैसे करने के लिए क्वेरी में Elasticsearch इस तरह:
SELECT * FROM tableA WHERE
tableA.clm1 IN ('A','B')
AND
(tableA.clm2 IN ('C', 'D') OR tableA.clm3 IN ('E','F'))
OR
tableA.clm4 = 'Z'
धन्यवाद ।
आप उपयोग कर सकते हैं bool क्वेरी
{
"query": {
"bool": {
"should": [
{
"term": {
"clm4.keyword": {
"value": "Z"
}
}
}, -- OR
{
"bool": {
"filter": [
{
"terms": {
"clm1.keyword": [
"A",
"B"
]
}
}, --AND
{
"bool": {
"should": [
{
"terms": {
"clm2.keyword": [
"C",
"D"
]
}
}, --OR
{
"terms": {
"clm3.keyword": [
"E",
"F"
]
}
}
]
}
}
]
}
}
]
}
}
}
filter
के बजायmust
कर रही है जब सही मैच प्रश्नों