Heya Bihn

The part I'm not getting is this: "the rolling average for every hour in
the last 28 days". ie what period should each bucket/rolling avg cover? an
hour? 28 days?

You can still do rolling averages with aggregations, but they require a bit
more work. I wanted to get the exact specs before trying to answer again :)

clint



On 12 March 2014 16:09, Binh Ly <binhly...@yahoo.com> wrote:

> Unfortunately a MA aggregation is not available at the moment (unless you
> accumulate/include all the prior data that you need into every doc, or you
> run multiple queries and aggregate it yourself - neither of which is
> desirable or flexible)
>
> Clint, a MA is an average computed in a "sliding window" fashion, where
> the time interval slides as the average is computed. So for example, let's
> say I have a daily statistic for 5 days:
>
> [Day1 = 100, Day 2 = 105, Day 3 = 101, Day 4 = 120, Day 5 = 200]
>
> A 2 day in-the-past MA would be computed as follows:
>
> Day1 = No data yet (since we don't have 2 days in-the-past worth of info)
> Day2 = (Day1 + Day2) / 2 = (100 + 105) / 2
> Day3 = (Day2 + Day3) / 2 = (105 + 101) / 2
> ...
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/89d909af-377e-44bd-8cec-31249f9f1d60%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/89d909af-377e-44bd-8cec-31249f9f1d60%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPt3XKSkaL59uXBw6b9b_0r_%2BJHVPR-WL2P0JuXox90xCJDh%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to