SMISMEMBER

SMISMEMBER key member [member ...]
Available since:
Redis Open Source 6.2.0
Time complexity:
O(N) where N is the number of elements being checked for membership
ACL categories:
@read, @set, @fast,
Compatibility:
Redis Software and Redis Cloud compatibility

Returns whether each member is a member of the set stored at key.

For every member, 1 is returned if the value is a member of the set, or 0 if the element is not a member of the set or if key does not exist.

Examples

SADD myset "one" SADD myset "one" SMISMEMBER myset "one" "notamember"

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
✅ Standard
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

Array reply: a list representing the membership of the given elements, in the same order as they are requested.
RATE THIS PAGE
Back to top ↑