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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to