TDIGEST.RANK

Syntax
TDIGEST.RANK key value [value ...]
Available in:
Redis Stack / Bloom 2.4.0
Time complexity:
O(1)

Retrieve the estimated rank of value (the number of observations in the sketch that are smaller than value + half the number of observations that are equal to value).

Multiple ranks can be returned with one call.

Parameters:

  • key: The name of the sketch (a t-digest data structure)
  • value: input value, for which the rank will be determined

Return

Array reply - the command returns an array of results populated with rank_1, rank_2, ..., rank_N.

Examples

redis> TDIGEST.RANK t-digest 5 10
1) "100"
2) "200"

Feedback

If you've found issues on this page, or have suggestions for improvement, please submit a request to merge or open an issue in the repository.