TAG.REM
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.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Always | Integer: the number of tags removed | Integer |
Examples
Section titled “Examples”127.0.0.1:6379> SET article:1 "..."OK127.0.0.1:6379> TAG.SET article:1 news sports(integer) 2127.0.0.1:6379> TAG.REM article:1 sports weather(integer) 1127.0.0.1:6379> TAG.GET article:11) "news"Compatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.