iamazy / elasticsearch-sql

parse sql into elasticsearch dsl with antlr4
https://iamazy.github.io/elasticsearch-sql/
MIT License
340 stars 89 forks source link

复杂条件下解析错误 #105

Open lauzhihao opened 1 year ago

lauzhihao commented 1 year ago
(a=1 or b=1 or c=1 or d=1 or e=1)
AND x = 1
AND (
  (aa=1 AND bb=1)  OR (cc = 1 AND dd =1 ) OR (ee = 1 AND ff = 1)
)

例如这个case,应该解析为must数组中包含3个条件,而实际解析为must只有x=1,其余的两组表达式拆成了4组should,仅满足之一,这样查询结果是错误的。