Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding connection step to bloom filter examples #2478

Merged
merged 2 commits into from Nov 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 14 additions & 10 deletions docs/redismodules.rst
Expand Up @@ -12,25 +12,28 @@ These are the commands for interacting with the `RedisBloom module <https://redi
**Create and add to a bloom filter**

.. code-block:: python

import redis
filter = redis.bf().create("bloom", 0.01, 1000)
filter.add("bloom", "foo")

import redis
r = redis.Redis()
r.bf().create("bloom", 0.01, 1000)
r.bf().add("bloom", "foo")

**Create and add to a cuckoo filter**

.. code-block:: python

import redis
filter = redis.cf().create("cuckoo", 1000)
filter.add("cuckoo", "filter")
import redis
r = redis.Redis()
r.cf().create("cuckoo", 1000)
r.cf().add("cuckoo", "filter")

**Create Count-Min Sketch and get information**

.. code-block:: python

import redis
r = redis.cms().initbydim("dim", 1000, 5)
r = redis.Redis()
r.cms().initbydim("dim", 1000, 5)
r.cms().incrby("dim", ["foo"], [5])
r.cms().info("dim")

Expand All @@ -39,8 +42,9 @@ These are the commands for interacting with the `RedisBloom module <https://redi
.. code-block:: python

import redis
r = redis.topk().reserve("mytopk", 3, 50, 4, 0.9)
info = r.topk().info("mytopk)
r = redis.Redis()
r.topk().reserve("mytopk", 3, 50, 4, 0.9)
r.topk().info("mytopk)

.. automodule:: redis.commands.bf.commands
:members: BFCommands, CFCommands, CMSCommands, TOPKCommands
Expand Down