Hi all,
I'm trying to get some statistics about certain events by time interval.
Is it possible to use a Pipeline aggregation that uses the doc_count of the parent aggregation?
Something like this...
Thank you!
Ana
GET /temp_sbc2/_search?size=0
{
"query": {
"bool": {
"must" : [
{"term": {"oper.keyword": "START"}},
{"term": { "dir.keyword": "O"}},
{"term": { "tags.keyword": "parsed_ok" }},
{"range": {
"@timestamp": {
"gte": "2018-03-01T00:00:00.00000Z",
"lte": "now" }
}}
]
}
},
"aggs" : {
"start_over_time" : {
"date_histogram" : {
"min_doc_count" : 300,
"field" : "@timestamp",
"interval" : "5m"
},"aggs": {
"test": {
"avg_bucket": {
"buckets_path": "start_over_time>doc_count"
}
}
}
}}}