Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ordering terms aggregation on top metrics null values (#85774)
If top metrics buckets are never collected (i.e. a filter never passing data to a top metrics aggregator) ordering results in an index out of bounds exception. THis is because the data array expected to include data is actually empty. Here we use the special Double.NaN value to report missing data to sort on for the top metrics metric field. This results in the comparator ordering data using another comparator (the default '_key' comprator).
- Loading branch information