Calculate the moving standard deviation of count on a histogram aggregation


#1

I want to calculate the moving average and standard deviation of daily count of twitter data. I know I can use the 'moving_avg' in the pipeline aggregation for the moving average, but how to compute the moving standard deviation of the count?

Thank you for the help and here is my code:

"aggs": {
"daily_count": {
"date_histogram": {
"field": "@timestamp",
"interval": "day"
},
"aggs": {
"count": {
"value_count": {
"field": "id_str"
}
},
"mvavg": {
"moving_avg": {
"buckets_path": "count",
"window": 14,
"model": "simple"
}
},
"mvstd": {
how to do this part......?
}
}
}


(system) #2