TAG.INTER
TAG.INTER tag [tag ...]
- Group
- Tags
- Complexity
- O(n * t), n being the keys of the rarest tag and t the tags
- Arity
- -2 (at least 2 words, counting the command name)
- Flags
- read-only, slow
- HotKV Cloud
- All plans
- On-Premise
- no license needed
TAG.INTER returns the keys that carry every one of the given tags. If any
tag is unused, the result is empty. The order is not defined.
As with TAG.MEMBERS, tags are shared by all logical databases, so a key in any database can appear. In cluster mode, the command answers from the node you send it to.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Always | Array of key names (empty when none match) | Array of key names |
Examples
Section titled “Examples”127.0.0.1:6379> MSET article:1 "..." article:2 "..."OK127.0.0.1:6379> TAG.SET article:1 news sports(integer) 2127.0.0.1:6379> TAG.SET article:2 news(integer) 1127.0.0.1:6379> TAG.INTER news sports1) "article:1"127.0.0.1:6379> TAG.INTER news weather(empty array)Compatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.