content/commands/topk.query.md
Checks whether one or more items are one of the Top-K items.
redis> TOPK.QUERY topk 42 nonexist
1) (integer) 1
2) (integer) 0
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Supported</span> | <span title="Supported">✅ Flexible & Annual</span> <span title="Supported">✅ Free & Fixed</nobr></span> | |
{{< multitabs id="topk-query-return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
1 if an item is in the Top-K or 0 otherwise.-tab-sep-
true if an item is in the Top-K or false otherwise.{{< /multitabs >}}