Skip to content

Commit aa29547

Browse files
author
Simon Prickett
authored
Merge pull request #197 from redis/document-non-zero-database-index-not-allowed
Updated documentation with note about indexing only being for database 0
2 parents 0841d9f + b1da14b commit aa29547

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ Customer.find((Customer.last_name == "Brookins") | (
237237

238238
These queries -- and more! -- are possible because **Redis OM manages indexes for you automatically**.
239239

240-
Querying with this index features a rich expression syntax inspired by the Django ORM, SQLAlchemy, and Peewee. We think you'll enjoy it!
240+
Querying with this index features a rich expression syntax inspired by the Django ORM, SQLAlchemy, and Peewee. We think you'll enjoy it!
241+
242+
**Note:** Indexing only works for data stored in Redis logical database 0. If you are using a different database number when connecting to Redis, you can expect the code to raise a `MigrationError` when you run the migrator.
241243

242244
### Embedded Models
243245

docs/connections.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The default connection is equivalent to the following `REDIS_OM_URL` environment
1818

1919
redis://localhost:6379
2020

21+
**Note:** Indexing only works for data stored in Redis logical database 0. If you are using a different database number when connecting to Redis, you can expect the code to raise a `MigrationError` when you run the migrator.
22+
2123
### Passwords and Usernames
2224

2325
Redis can be configured with password protection and a "default" user, in which case you might connect using only the password.
@@ -34,6 +36,8 @@ If your Redis instance requires both a username and a password, you would includ
3436

3537
Redis databases are numbered, and the default is 0. You can leave off the database number to use the default database, or specify it.
3638

39+
**Note:** Indexing only works for data stored in Redis logical database 0. If you are using a different database number when connecting to Redis, you can expect the code to raise a `MigrationError` when you run the migrator.
40+
3741
### SSL Connections
3842

3943
Use the "rediss" prefix for SSL connections:

docs/getting_started.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ The default connection is equivalent to the following `REDIS_OM_URL` environment
124124

125125
**TIP:** Redis databases are numbered, and the default is 0. You can leave off the database number to use the default database.
126126

127+
**Note:** Indexing only works for data stored in Redis logical database 0. If you are using a different database number when connecting to Redis, you can expect the code to raise a `MigrationError` when you run the migrator.
128+
127129
Other supported prefixes include "rediss" for SSL connections and "unix" for Unix domain sockets:
128130

129131
rediss://[[username]:[password]]@localhost:6379/0

0 commit comments

Comments
 (0)