Nevoie De Ajutor.
Cum de a face Interogare în Elasticsearch astfel:
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'
Multumesc.
Nevoie De Ajutor.
Cum de a face Interogare în Elasticsearch astfel:
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'
Multumesc.
Puteți utiliza bool interogare
{
"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
în loc demust
atunci când faci potrivire exactă interogări