VREM
Syntax
VREM key element
- Available since:
- Redis CE 8.0.0
- Time complexity:
- O(log(N)) for each element removed, where N is the number of elements in the vector set.
Remove an element from a vector set.
VADD vset VALUES 3 1 0 1 bar
(integer) 1
VREM vset bar
(integer) 1
VREM vset bar
(integer) 0
VREM
reclaims memory immediately. It does not use tombstones or logical deletions, making it safe to use in long-running applications that frequently update the same vector set.
Required arguments
key
is the name of the key that holds the vector set.
element
is the name of the element to remove from the vector set.