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.GET

Last updated
TAG.GET key
Group
Tags
Complexity
O(n), n being the key's tags
Arity
2 (exactly, counting the command name)
Flags
read-only, fast
Keys
first 1, last 1, step 1
HotKV Cloud
All plans
On-Premise
no license needed

TAG.GET returns the tags attached to key with TAG.SET. The order is not defined.

Case RESP2 RESP3
Key has tags Array of bulk strings Array of bulk strings
No tags, or no such key Empty array Empty array
127.0.0.1:6379> SET article:1 "..."
OK
127.0.0.1:6379> TAG.SET article:1 news
(integer) 1
127.0.0.1:6379> TAG.GET article:1
1) "news"
127.0.0.1:6379> TAG.GET article:2
(empty array)

HotKV-only command.

TAG.SET, TAG.COUNT, TAG.EXISTS