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

Last updated
TAG.MEMBERS tag
Group
Tags
Complexity
O(n), n being the keys with the tag
Arity
2 (exactly, counting the command name)
Flags
read-only, slow
HotKV Cloud
All plans
On-Premise
no license needed

TAG.MEMBERS returns every key name that carries tag. The order is not defined.

Tags are shared by all logical databases, so a returned key may live in a database other than the selected one. In cluster mode, the command answers from the node you send it to.

Case RESP2 RESP3
Tag in use Array of key names Array of key names
Unknown tag Empty array Empty array
127.0.0.1:6379> MSET article:1 "..." article:2 "..."
OK
127.0.0.1:6379> TAG.SET article:1 news
(integer) 1
127.0.0.1:6379> TAG.SET article:2 news
(integer) 1
127.0.0.1:6379> TAG.MEMBERS news
1) "article:2"
2) "article:1"

The order of the keys can differ.

HotKV-only command.

TAG.INTER, TAG.SET, TAG.GET