content/commands/bf.card.md
Returns the cardinality of a Bloom filter - number of items that were added to a Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter)
(since RedisBloom 2.4.4)
is key name for a Bloom filter.
</details>{{< highlight bash >}} redis> BF.ADD bf1 item_foo (integer) 1 redis> BF.CARD bf1 (integer) 1 redis> BF.CARD bf_new (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"><nobr>✅ Flexible & Annual</nobr></span> <span title="Supported">✅ Free & Fixed</nobr></span> | |
{{< multitabs id="bf-card-return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
0 when the given key does not exist.Note: when key exists, BF.CARD returns the same value as BF.INFO key ITEMS.
-tab-sep-
One of the following:
0 when the given key does not exist.Note: when key exists, BF.CARD returns the same value as BF.INFO key ITEMS.
{{< /multitabs >}}