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

Use explicit index name in RediSearch example #2466

Merged
Merged
Changes from 2 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
5 changes: 3 additions & 2 deletions docs/redismodules.rst
Expand Up @@ -117,8 +117,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"))
chayim marked this conversation as resolved.
Show resolved Hide resolved
print(r.ft(index_name).info())


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