Module Hub Beta

MZRANK

key elem [elem ...]

A variadic variant for ZRANK, returns the ranks of multiple members in a Sorted Set.

Return Value

Array reply: list of elements’ integer ranks.

Examples

redis> ZADD myzset 1 “one”
(integer) 1
redis> ZADD myzset 2 “two”
(integer) 1
redis> ZADD myzset 3 “three”
(integer) 1
redis> MZRANK myzset “one” “three”
1) (integer) 0
2) (integer) 2

© 2017 Redis Labs, Inc. All rights reserved.