The extended stats aggregation returns a few more statistics in addition to the ones returned by the stats aggregation:
GET bigginsight/_search
{
"aggregations": {
"download_estats": {
"extended_stats": {
"field": "downloadTotal"
}
}
},
"size": 0
}
The response looks like the following:
{
"took": 15,
"timed_out": false,
...,
"hits": {
"total" : {
"value" : 10000,
"relation" : "gte"
},
"max_score": 0,
"hits": []
},
"aggregations": {
"download_estats": {
"count": 242835,
"min": 0,
"max": 241213,
"avg": 9049.102065188297,
"sum": 2197438700,
"sum_of_squares": 133545882701698,
"variance": 468058704.9782911,
"std_deviation": 21634.664429528162,
"std_deviation_bounds": {
"upper": 52318.43092424462,
"lower": -34220.22679386803
}
}
}
}
It also returns the sum of squares, variance, standard deviation, and standard deviation bounds.