Skip to main content

ZLEXCOUNT

Syntax

ZLEXCOUNT key min max

Module

sortedset

Categories

read slow sortedset

Description

Returns the number of elements in within the sorted set within the lexicographical range between min and max. Returns 0, if the keys does not exist or if all the members do not have the same score. If the value held at key is not a sorted set, an error is returned.

Examples

Find the intersection between 2 sorted sets:

vault, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
count, err := vault.ZLexCount("key", "aa", "xx")