TDIGEST.REVRANK

Syntax
TDIGEST.REVRANK 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 larger 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) "200"
2) "100"

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.