Open
Description
🐛 Wrong type
The missing
for TopMetricsAggregation
is defined per field and not per aggregation. Currently, it is only possible to define the field
but no missing
property.
see https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-metrics#_missing
Besides that, TopMetricsAggregation
inherits from MetricAggregationBase
which wrongly inherits a missing
and script
, which are both not available according to https://www.elastic.co/docs/reference/aggregations/search-aggregations-metrics-top-metrics . Note, the missing
is wrongly available per aggregation and not per field.
Definition
As a first solution to at least provide support for a proper definition of missing
, the TopMetricsValue
needs to be extended by missing: FieldValue
:
export class TopMetricsValue {
field: Field
missing: FieldValue;
}
Changing the inheritance from MetricAggregationBase
might have further implications I'm not aware of.