Stats aggregation of a date_histogram

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 elasticsearch+unsubscribe@googlegroups.com.
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.

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 java.dev.mtl@gmail.com 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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/d63a3edf-f9c6-4e40-9870-7b61e0e6a831%40googlegroups.comhttps://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 elasticsearch+unsubscribe@googlegroups.com.
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.

Thanks is this something planned?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b7a8b7d7-a7d0-4943-bacf-5014e4e7183f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No concrete plans so far, but this is indeed a feature we are thinking of.

On Tue, May 27, 2014 at 3:17 PM, John Smith java.dev.mtl@gmail.com wrote:

Thanks is this something planned?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b7a8b7d7-a7d0-4943-bacf-5014e4e7183f%40googlegroups.com
.
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7RyN6EzRawEgPQ%3DbQOpqyJtJBRJUP1EGQt2BcCFaa9FQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.