content/commands/cf.exists.md
Determines whether a given item was added to a cuckoo filter.
This command is similar to [CF.MEXISTS]({{< relref "commands/cf.mexists/" >}}), except that only one item can be checked.
is key name for a cuckoo filter.
</details> <details open><summary><code>item</code></summary>is an item to check.
</details>{{< highlight bash >}} redis> CF.ADD cf item1 (integer) 1 redis> CF.EXISTS cf item1 (integer) 1 redis> CF.EXISTS cf item2 (integer) 0 {{< / highlight >}}
| 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="cf-exists-return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
1 means that, with high probability, item was already added to the filter, and 0 means that either the key does not exist or that the item had not been added to the filter.-tab-sep-
One of the following:
true means that, with high probability, item was already added to the filter, and false means that either key does not exist or that item had not been added to the filter.key is not of the correct type.{{< /multitabs >}}