Is this doable


(Shalini) #1

Hi All,

I am using elastic search 1.4.2.
Data:
State, City, Population
LA, Shreveport, 10
UT, Salt Lake City, 20
TX, Houston, 30
TX, Killeen, 60

I need to perform the following agregation;
By City show me [sum city population] / [state population]

So for above data the result will be;
Shreveport 1
Salt Lake City 1
Houston 0.33
Killeen 0.67


(Shalini) #2

I have looked at the different aggregations available with Elastic Search.
But I assume this is currently not possible, as this requires aggregation at multi level ( for hierarchal data) and passing the result of one aggregation to another aggregation.


(David Pilato) #3

May be Pipeline aggs will help?

See also:

Hope this helps


(Shalini) #4

Thanks David for the reply!

I am using elasticsearch 1.4.2 and pipeline aggregation are part of 2.0 version which is still not released ( it is still in beta phase!).

I assume I will have to hold till than?


(system) #5