Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions docs/redismodules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ These are the commands for interacting with the `RedisBloom module <https://redi
**Create and add to a bloom filter**

.. code-block:: python
import redis

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

**Create and add to a cuckoo filter**

.. code-block:: python

import redis
import redis
r = redis.Redis()
r.cf().create("cuckoo", 1000)
r.cf().add("cuckoo", "filter")
Expand Down Expand Up @@ -107,7 +107,8 @@ Examples of how to combine search and json can be found `here <examples/search_j
RediSearch Commands
*******************

These are the commands for interacting with the `RediSearch module <https://redisearch.io>`_. Below is a brief example, as well as documentation on the commands themselves.
These are the commands for interacting with the `RediSearch module <https://redisearch.io>`_. Below is a brief example, as well as documentation on the commands themselves. In the example
below, an index named *my_index* is being created. When an index name is not specified, an index named *idx* is created.

**Create a search index, and display its information**

Expand All @@ -117,8 +118,9 @@ These are the commands for interacting with the `RediSearch module <https://redi
from redis.commands.search.field import TextField

r = redis.Redis()
r.ft().create_index(TextField("play", weight=5.0), TextField("ball"))
print(r.ft().info())
index_name = "my_index"
r.ft(index_name).create_index(TextField("play", weight=5.0), TextField("ball"))
print(r.ft(index_name).info())


.. automodule:: redis.commands.search.commands
Expand Down