Aggregations cannot run on the data that they produce so this is something
that you would need to do on client side for now.


On Mon, May 26, 2014 at 8:45 PM, John Smith <[email protected]> wrote:

> Using ES 1.2
>
> Is there a way to aggregate an aggregation?
>
> So say I have a query for "views" per seconds for the last 5 minutes...
>
> POST /xxx/xxx/_search
> {
>   "size": 0,
>   "aggs": {
>     "last_5_mins": {
>       "filter": {
>         "range": {
>           "viewed": {
>             "gte": "now-5m",
>             "lte": "now"
>           }
>         }
>       },
>       "aggs": {
>         "views_per_second": {
>           "date_histogram": {
>             "field": "viewed",
>             "interval": "second"
>           }
>         }
>       }
>     }
>   }
> }
>
> I would like to get my a stats aggregation of the date_histogram.
>
> So I would like to know what was my highest peek of views and my avg views
> per second.
> Is it possible or I have to do those calculations myself based on the
> aggregation returned?
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/d63a3edf-f9c6-4e40-9870-7b61e0e6a831%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/d63a3edf-f9c6-4e40-9870-7b61e0e6a831%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Adrien Grand

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7QNwyd_5K5-3NuU%3DwWaey2XWntFckF9skBmBXSogUXbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to