BF.INFO
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.
Fields
Section titled “Fields”| 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.
Return value
Section titled “Return value”| 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.
Examples
Section titled “Examples”127.0.0.1:6379> BF.RESERVE signups 0.01 1000OK127.0.0.1:6379> BF.ADD signups alice(integer) 1127.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 rate10) (integer) 2127.0.0.1:6379> BF.INFO signups ITEMS1) (integer) 1Compatibility
Section titled “Compatibility”Same fields and values as BF.INFO in RedisBloom: a filter created with the
same settings reports the same capacity and size.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.