Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

TAG.REM

Last updated
TAG.REM key tag [tag ...]
Group
Tags
Complexity
O(n), n being the tags
Arity
-3 (at least 3 words, counting the command name)
Flags
write, fast
Keys
first 1, last 1, step 1
HotKV Cloud
All plans
On-Premise
no license needed

TAG.REM detaches the given tags from key. Tags the key does not carry are ignored. The key does not need to exist: the command answers 0 for a key that has no tags. A key’s tags are removed on their own when the key is removed, so you only need TAG.REM to take a tag off a key that stays.

Case RESP2 RESP3
Always Integer: the number of tags removed Integer
127.0.0.1:6379> SET article:1 "..."
OK
127.0.0.1:6379> TAG.SET article:1 news sports
(integer) 2
127.0.0.1:6379> TAG.REM article:1 sports weather
(integer) 1
127.0.0.1:6379> TAG.GET article:1
1) "news"

HotKV-only command.

TAG.SET, TAG.GET, TAG.COUNT