How to use bloomfilters with Ruby's Redis client

51 Views Asked by At

All of the ruby libraries that exist are doing a custom bloomfilter implementation. I want to use Redis's native bloomfilter functionality.

Is there a way to send manual commands to redis using the ruby client?

1

There are 1 best solutions below

0
On BEST ANSWER

You can use it by calling those methods manually. For example:

client.call("BF.ADD", bloom_filter_name, key)
client.call("BF.EXISTS", bloom_filter_name, key)

Note

  • You need to enable the bloom filter module. It doesn't come by default.
  • AFAIK, it appears that you can only use the bloom filter (or cuckoo filter) module if you pay for Redis Enterprise.
  • The code for the bloom filter (or cuckoo) filter that you might find online are community projects
  • Any links to download the module are dead links.

I would love to be wrong about the above caveats!