Sorted Set

ZLEXCOUNT

Returns the number of elements in the sorted set stored at key filterd by lex.

Arguments

keybodystrrequired

The key to get.

minbodystrrequired

The lower lexicographical bound to filter by.

Use - to disable the lower bound.

maxbodystrrequired

The upper lexicographical bound to filter by.

Use + to disable the upper bound.

Response

intrequired

The number of matched.

Example
redis.zadd("myset", {"a": 1, "b": 2, "c": 3})assert redis.zlexcount("myset", "-", "+") == 3
Loading search…