Finding percentage difference/deviation using 2 queries

(Suriya) #1


So what I am trying to do is find the percent difference over time. For this, I take the average values over the past hour and compare them to the average values over the past day. I can do this using 2 queries and it works, but it would be more efficient to have elastic search itself return the percent differences than having me query twice and do the calculations in my Java code.

Thanks in advance!

(Mark Walkom) #2

This will be possible with ES 2.0 and pipeline aggs, at the moment you need to do 2 queries.

(Suriya) #3

Are pipeline aggs currently implemented in the master version so I could try using them now?

(Suriya) #4

When working with the master trying to test out piped aggregations, I received this error in trying to create my TransportClient. Any idea what it is about?

Exception in thread "main" java.lang.IllegalStateException: path.home is not configured
at org.elasticsearch.env.Environment.(
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(
at org.elasticsearch.client.transport.TransportClient$
at com.viptela.test.testcases.elasticsearch.ESTest.main(

(system) #5