Percentile ranks aggregation #
A multi-value metrics aggregation that answers the inverse of
percentiles: for each value you provide, what
percentage of documents is at or below it.
Example #
Where do the prices 30 and 45 sit in the distribution?
30 is at rank 75 (75% of documents cost 30 or less), 45 at
≈91.7.
Parameters for percentile_ranks
#
field
(Required, string) Numeric field you wish to aggregate.values
(Required, number array) Values whose ranks you want.hdr
(Optional, object) HDR histogram settings (number_of_significant_value_digits); the engine computes exact ranks over collected values.