How could I have MySQL sum() and group by clause within my elasticsearch query?

(Kulasangar Gowrisangar) #1

I'm trying perform an elasticsearch query as a GET request in order pull data from the index which I created. The data which is in the index is, a table from MySQL DB, configured though logstash.

Here is my request without the IN clause:


In the above, I should be able to append sum(chargeAmount+0) & group by . I tried giving it a search on the web, but couldn't find any solutions.

Any help could be appreaciated.

(Nik Everett) #2

Have a look at aggregations, in particular the terms and sum aggregations.

(system) #3