TAG.EXISTS
TAG.EXISTS key tag
- Group
- Tags
- Complexity
- O(1)
- Arity
- 3 (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.EXISTS tells you whether tag is attached to key.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Key has the tag | Integer 1 |
Integer 1 |
| Key lacks the tag, or no such key | Integer 0 |
Integer 0 |
Examples
Section titled “Examples”127.0.0.1:6379> SET article:1 "..."OK127.0.0.1:6379> TAG.SET article:1 news(integer) 1127.0.0.1:6379> TAG.EXISTS article:1 news(integer) 1127.0.0.1:6379> TAG.EXISTS article:1 sports(integer) 0Compatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.