summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-12-01 23:07:52 +0100
committerChristian Pointner <equinox@spreadspace.org>2014-12-01 23:07:52 +0100
commit0b91f8ab3204669de188b1ef4eb91f6554139443 (patch)
tree1fbb1eaf742c69bbbd0851168fbc37f389a94638
parentes5: average for clients (diff)
es5: histogram agg and avg clients work now
-rw-r--r--src/es5/es-query.json32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/es5/es-query.json b/src/es5/es-query.json
index 0db2cfb..6fdfb81 100644
--- a/src/es5/es-query.json
+++ b/src/es5/es-query.json
@@ -1,20 +1,24 @@
{
- "aggregations":
- {
- "by_source":
- {
- "terms": { "script": "[ doc['hostname'].value, doc['streamer-id.content-id'].value, doc['streamer-id.format'].value, doc['streamer-id.quality'].value ].join('/') ",
- "size": 0
- }
+ "aggregations": {
+ "timeslots": {
+ "date_histogram": {
+ "field": "start-time",
+ "interval": "1h"
},
- "the_total_time":
- {
- "sum": { "field": "duration-ms" }
- },
- "avg_clients":
- {
- "avg": { "field": "data.client-count" }
+ "aggregations": {
+ "by_source": {
+ "terms": {
+ "script": "[ doc['hostname'].value, doc['streamer-id.content-id'].value, doc['streamer-id.format'].value, doc['streamer-id.quality'].value ].join('/') ",
+ "size": 0
+ },
+ "aggregations": {
+ "avg_clients": {
+ "avg": { "field": "data.client-count" }
+ }
+ }
+ }
}
+ }
}
}