How to find the Sum, Average,Division and Product using Elasticsearch


(vijuitech) #1

Hi,
How to find the Sum, Average,Product of the values like MySql
in Elasticsearch for the given sample?

SELECT (SUM(Sales)/(COUNT(Items)*(Tax))) Prominence FROM Test;

cheers!

George


(Igor Motov) #2

Take a look at Statistical Facethttp://www.elasticsearch.org/guide/reference/api/search/facets/statistical-facet.html
.

On Monday, July 16, 2012 7:59:47 AM UTC-4, George Viju wrote:

Hi,
How to find the Sum, Average,Product of the values like MySql
in Elasticsearch for the given sample?

SELECT (SUM(Sales)/(COUNT(Items)*(Tax))) Prominence FROM Test;

cheers!

George


(system) #3