diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-12-01 23:07:52 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-12-01 23:07:52 +0100 |
commit | 0b91f8ab3204669de188b1ef4eb91f6554139443 (patch) | |
tree | 1fbb1eaf742c69bbbd0851168fbc37f389a94638 | |
parent | es5: average for clients (diff) |
es5: histogram agg and avg clients work now
-rw-r--r-- | src/es5/es-query.json | 32 |
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" } + } + } + } } + } } } |