Commit 3ae610d
authored
feat(search): avg metric aggregation
Adds `avg` as a permitted value on `aggregationOption.metricKind` and
`searchAggregation.metricKind`. Distinct from sum/min/max because an
average of two averages isn't mergeable: the backend has to carry
(sum, count) internally per bucket and only collapse to the scalar
`value` at the outermost merge.
Wire shape stays symmetrical with sum/min/max: callers still just
read `value` off the response; the (sum, count) bookkeeping is
entirely service-side.1 parent 7d21eba commit 3ae610d
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6579 | 6579 | | |
6580 | 6580 | | |
6581 | 6581 | | |
| 6582 | + | |
| 6583 | + | |
| 6584 | + | |
| 6585 | + | |
6582 | 6586 | | |
6583 | 6587 | | |
6584 | 6588 | | |
6585 | 6589 | | |
| 6590 | + | |
6586 | 6591 | | |
6587 | 6592 | | |
6588 | 6593 | | |
| |||
6769 | 6774 | | |
6770 | 6775 | | |
6771 | 6776 | | |
| 6777 | + | |
6772 | 6778 | | |
6773 | 6779 | | |
6774 | 6780 | | |
| |||
0 commit comments