TAG.COUNT
TAG.COUNT key
- Group
- Tags
- Complexity
- O(1)
- 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.COUNT returns how many tags are attached to key.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Always | Integer: the number of tags (0 when none, or no such key) |
Integer |
Examples
Section titled “Examples”127.0.0.1:6379> SET article:1 "..."OK127.0.0.1:6379> TAG.SET article:1 news sports europe(integer) 3127.0.0.1:6379> TAG.COUNT article:1(integer) 3127.0.0.1:6379> TAG.COUNT article:2(integer) 0Compatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.