elasticsql icon indicating copy to clipboard operation
elasticsql copied to clipboard

Multiple Group by errors

Open vitaneyeyu opened this issue 5 years ago • 3 comments

sql like : select count(id) from A where A.id > 5 group by A.a, A.b; because of innerMap["terms"] = msi{ "field": colName.Name.String(), "size": 0, } will gen the dsl like: "terms":{"field":"field2","size":0} and then make a error: "reason":"[size] must be greater than 0 using es7.X

vitaneyeyu avatar Aug 10 '20 03:08 vitaneyeyu

Sorry for the late reply

Does changing the SQL to 'select count(id) from A where A.id > 5 group by A.a, A.b limit 100' solves the problem?

cch123 avatar Aug 21 '20 09:08 cch123

I tried it and it still didn't work

vitaneyeyu avatar Sep 21 '20 04:09 vitaneyeyu

you can consider this change by one of this lib's user, I dont know whether this is a common fix

https://github.com/amitvijayant/elasticsql

cch123 avatar Sep 21 '20 11:09 cch123