Latest web development tutorials

RedisのZlexcountコマンド

Redisのは、順序セット(ソートセット)

算出区間辞書順序集合内のメンバーの指定された数以内のRedis Zlexcountコマンド。

文法

次のようにRedisのZlexcount基本的なコマンドの構文は次のとおりです。

redis 127.0.0.1:6379> ZLEXCOUNT KEY MIN MAX

利用可能なバージョン

> = 2.8.9

戻り値

区間内のメンバーの数を指定します。

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のは、順序セット(ソートセット)