avg

Avg aggregation

/ avg, / aggregation

Avg aggregation # A single-value metrics aggregation that computes the average of numeric values that are extracted from the aggregated documents. Examples # Assuming the data consists of documents representing exams grades (between 0 and 100) of students we can average their scores with: POST /exams/_search { "aggs": { "avg_grade": { "avg": { "field": "grade" } } } } The above aggregation computes the average grade over all documents. ...