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

Last updated
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.

Case RESP2 RESP3
Always Array of key names (empty when none match) Array of key names
127.0.0.1:6379> MSET article:1 "..." article:2 "..."
OK
127.0.0.1:6379> TAG.SET article:1 news sports
(integer) 2
127.0.0.1:6379> TAG.SET article:2 news
(integer) 1
127.0.0.1:6379> TAG.INTER news sports
1) "article:1"
127.0.0.1:6379> TAG.INTER news weather
(empty array)

HotKV-only command.

TAG.MEMBERS, TAG.SET, VSIM.SEARCH