Skip to content

Add RedisBloom-compatible BF.* commands - #1

Merged
rafaelescrich merged 1 commit into
mainfrom
feat/redisbloom-bf-commands
Jul 20, 2026
Merged

Add RedisBloom-compatible BF.* commands#1
rafaelescrich merged 1 commit into
mainfrom
feat/redisbloom-bf-commands

Conversation

@rafaelescrich

Copy link
Copy Markdown
Owner

Summary

  • Adds a Value::Bloom type backed by fastbloom (database/src/bloom.rs).
  • Implements RedisBloom commands used by Forja's multichain indexer: BF.RESERVE, BF.ADD, BF.MADD, BF.EXISTS, BF.MEXISTS.
  • Routes bf.* commands directly (same pattern as ft.*), bypassing generic command mapping.

Behavior notes

  • BF.RESERVE returns OK or ERR item exists if the key already exists.
  • BF.ADD auto-creates a default filter (0.01 FPR, capacity 100) when the key is missing; returns 1 for new items, 0 if probably already present.
  • BF.EXISTS on a missing key returns 0.
  • Not yet implemented: scalable sub-filters (EXPANSION), BF.INFO, persistence/dump format parity with RedisBloom.

Test plan

  • cargo test -p command (includes 4 Bloom-specific unit tests)
  • Manual: point Forja indexer bloomfilter.type: redis at RedVector and run BF.RESERVE / BF.MADD / BF.EXISTS against a sandbox instance

Implements BF.RESERVE, BF.ADD, BF.MADD, BF.EXISTS, and BF.MEXISTS using fastbloom so Forja's multichain indexer can use RedVector instead of Redis Stack.
@rafaelescrich
rafaelescrich merged commit a05ae28 into main Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant