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.

BF.INFO

Last updated
BF.INFO key [CAPACITY | SIZE | FILTERS | ITEMS | EXPANSION]
Group
Bloom filter
Complexity
O(1)
Arity
-1 (at least 1 words, counting the command name)
Flags
none
Keys
first 1, last 1, step 1
HotKV Cloud
All plans
On-Premise
no license needed

BF.INFO describes the Bloom filter at key. Pass one field name to get only that value.

Field Option Meaning
Capacity CAPACITY Items the filter is sized for, across all its layers.
Size SIZE Memory taken by the filter, in bytes.
Number of filters FILTERS Layers: 1, plus one for each time a scaling filter grew.
Number of items inserted ITEMS Items added (as BF.CARD reports).
Expansion rate EXPANSION The growth factor, or nil for a non-scaling filter.

Option names are case-insensitive.

Case RESP2 RESP3
All fields Flat array of field names and values Map
One field Array with the one value Map with the one field

Error replies: ERR not found when the key does not exist, Invalid information value for an unknown field, and WRONGTYPE.

127.0.0.1:6379> BF.RESERVE signups 0.01 1000
OK
127.0.0.1:6379> BF.ADD signups alice
(integer) 1
127.0.0.1:6379> BF.INFO signups
1) Capacity
2) (integer) 1000
3) Size
4) (integer) 1480
5) Number of filters
6) (integer) 1
7) Number of items inserted
8) (integer) 1
9) Expansion rate
10) (integer) 2
127.0.0.1:6379> BF.INFO signups ITEMS
1) (integer) 1

Same fields and values as BF.INFO in RedisBloom: a filter created with the same settings reports the same capacity and size.

BF.CARD, BF.RESERVE