summaryrefslogtreecommitdiff
path: root/src/es5
diff options
context:
space:
mode:
Diffstat (limited to 'src/es5')
-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" }
+ }
+ }
+ }
}
+ }
}
}