English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Zlexcount Command

Redis Sorted Sets (sorted set)

The Redis Zlexcount command calculates the number of members in the specified dictionary range within the sorted set.

Syntax

Basic Syntax of redis Zlexcount Command

redis 127.0.0.1:6379> ZLEXCOUNT KEY MIN MAX

Available Versions

>= 2.8.9

Return Value

Number of members in the specified range.

Online Examples

redis 127.0.0.1:6379> ZADD myzset 0 a 0 b 0 c 0 d 0 e
(integer) 5
redis 127.0.0.1:6379> ZADD myzset 0 f 0 g
(integer) 2
redis 127.0.0.1:6379> ZLEXCOUNT myzset - +
(integer) 7
redis 127.0.0.1:6379> ZLEXCOUNT myzset [b [f
(integer) 5

Redis Sorted Sets (sorted set)