TAG.MEMBERS
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.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Tag in use | Array of key names | Array of key names |
| Unknown tag | Empty array | Empty array |
Examples
Section titled “Examples”127.0.0.1:6379> MSET article:1 "..." article:2 "..."OK127.0.0.1:6379> TAG.SET article:1 news(integer) 1127.0.0.1:6379> TAG.SET article:2 news(integer) 1127.0.0.1:6379> TAG.MEMBERS news1) "article:2"2) "article:1"The order of the keys can differ.
Compatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.