--- acl_categories: - '@bloom' - '@read' - '@fast' arguments: - name: key type: key - arguments: - name: capacity token: CAPACITY type: pure-token - name: size token: SIZE type: pure-token - name: filters token: FILTERS type: pure-token - name: items token: ITEMS type: pure-token - name: expansion token: EXPANSION type: pure-token name: single_value optional: true type: oneof categories: - docs - develop - stack - oss - rs - rc - oss - kubernetes - clients complexity: O(1) description: Returns information about a Bloom Filter group: bf hidden: false linkTitle: BF.INFO module: Bloom railroad_diagram: /images/railroad/bf.info.svg since: 1.0.0 stack_path: docs/data-types/probabilistic summary: Returns information about a Bloom Filter syntax_fmt: BF.INFO key [CAPACITY | SIZE | FILTERS | ITEMS | EXPANSION] title: BF.INFO --- Returns information about a Bloom filter. ## Required arguments
key is key name for a Bloom filter.
## Optional arguments
CAPACITY Return the number of unique items that can be stored in this Bloom filter before scaling would be required (including already added items).
SIZE Return the memory size: number of bytes allocated for this Bloom filter.
FILTERS Return the number of sub-filters.
ITEMS Return the number of items that were added to this Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter).
EXPANSION Return the expansion rate.
## Examples {{< highlight bash >}} redis> BF.ADD bf1 observation1 (integer) 1 redis> BF.INFO bf1 1) Capacity 2) (integer) 100 3) Size 4) (integer) 240 5) Number of filters 6) (integer) 1 7) Number of items inserted 8) (integer) 1 9) Expansion rate 10) (integer) 2 redis> BF.INFO bf1 CAPACITY 1) (integer) 100 {{< / highlight >}} ## Redis Software and Redis Cloud compatibility | Redis
Software | Redis
Cloud | Notes | |:----------------------|:-----------------|:------| | ✅ Supported
| ✅ Flexible & Annual
✅ Free & Fixed | | ## Return information {{< multitabs id="bf-info-return-info" tab1="RESP2" tab2="RESP3" >}} One of the following: * A singleton [array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with an [integer]({{< relref "/develop/reference/protocol-spec#integers" >}}) representing the value of the requested property. * An [array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with [simple string]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}) and [integer]({{< relref "/develop/reference/protocol-spec#integers" >}}) pairs. * [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the key does not exist. -tab-sep- One of the following: * [Map reply]({{< relref "/develop/reference/protocol-spec#maps" >}}) with [simple string]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}) and [integer]({{< relref "/develop/reference/protocol-spec#integers" >}}) pairs. * [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the key does not exist. {{< /multitabs >}}