fix: nested top metrics sort on keyword field (#85058)
Using a double as a return value works only if the field we are sorting on is a number. If the field is not a value we can convert to a double, like a non-numeric keyword, converting it to a number returns `NaN`. Without this patch, sorting takes place on the bucket key, if the order field points to a non-numeric value. The additional bucket key comparator is implicitly added as a tie breaker to avoid non-deterministic sorting of buckets. With this change we support sorting using any subclass of SortValue. This means the bucket key will be used just in case of equal values on the order field. Issue: #78506
Loading
Please register or sign in to comment