VISMEMBER
Since 1.1.0Vector sets
Syntax
VISMEMBER key elementTells whether element is in the vector set at key: 1 if it is, 0 if not. A key that does not exist is an empty set, so the answer is 0. Use it to check before VADD, which would replace the vector of an element already there, or before VSIM ... ELE, which fails for an element that is not.
Reply
1or0, as an integer.WRONGTYPEif the key holds another type.
Examples
> VADD points VALUES 3 1 0 0 a
(integer) 1
> VISMEMBER points a
(integer) 1
> VISMEMBER points nope
(integer) 0
> VISMEMBER missing a
(integer) 0