Sum() in elastic search Using SQL Plugin

Hello ,

I am running a sql query on elastic sql plugin but the sum which I am getting is not correct ...

Query is -
SELECT Field1,Field2,SUM(Field3) st FROM XXX where Field4='ZZZ' and Field5= 'YYY'
GROUP BY Field1,Field2 .

But the sum which I am getting is more than what it should be ...I did search about it and found if index is corrupted , this could happen and reindexing can help...
But how to go about it ?


@shrutip hey there, any chance you could create a smallish, reproduceable scenario for this issue?
Another idea would be to use the _translate API, see what query ES-SQL is producing and use that to run against Elasticsearch and double check the results.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.