Skip to content

Commit 33060dc

Browse files
committed
Updating supported Redis versions and default search dialect info in readme and library version
1 parent 052e8ee commit 33060dc

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

README.md

+32-3
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,16 @@ Looking for a high-level library to handle object mapping? See [redis-om-python]
5454

5555
## Supported Redis Versions
5656

57-
The most recent version of this library supports redis version [5.0](https://github.com/redis/redis/blob/5.0/00-RELEASENOTES), [6.0](https://github.com/redis/redis/blob/6.0/00-RELEASENOTES), [6.2](https://github.com/redis/redis/blob/6.2/00-RELEASENOTES), [7.0](https://github.com/redis/redis/blob/7.0/00-RELEASENOTES), [7.2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES) and [7.4](https://github.com/redis/redis/blob/7.4/00-RELEASENOTES).
57+
The most recent version of this library supports redis version [7.2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES), [7.4](https://github.com/redis/redis/blob/7.4/00-RELEASENOTES) and [8.0](https://github.com/redis/redis/blob/8.0/00-RELEASENOTES).
5858

5959
The table below highlights version compatibility of the most-recent library versions and redis versions.
6060

6161
| Library version | Supported redis versions |
6262
|-----------------|-------------------|
6363
| 3.5.3 | <= 6.2 Family of releases |
6464
| >= 4.5.0 | Version 5.0 to 7.0 |
65-
| >= 5.0.0 | Version 5.0 to current |
65+
| >= 5.0.0 | Version 5.0 to 7.4 |
66+
| >= 6.0.0 | Version 7.2 to current |
6667

6768

6869
## Usage
@@ -152,8 +153,36 @@ The following example shows how to utilize [Redis Pub/Sub](https://redis.io/docs
152153
{'pattern': None, 'type': 'subscribe', 'channel': b'my-second-channel', 'data': 1}
153154
```
154155

156+
### Redis’ search and query capabilities default dialect
155157

156-
--------------------------
158+
Release 6.0.0 introduces a client-side default dialect for Redis’ search and query capabilities.
159+
By default, the client now overrides the server-side dialect with version 2, automatically appending *DIALECT 2* to commands like *FT.AGGREGATE* and *FT.SEARCH*.
160+
161+
**Important**: Be aware that the query dialect may impact the results returned. If needed, you can revert to a different dialect version by configuring the client accordingly.
162+
163+
``` python
164+
>>> r.ft().create_index(
165+
>>> (TextField("name"), TextField("lastname")),
166+
>>> definition=IndexDefinition(prefix=["test:"]),
167+
>>> )
168+
169+
>>> r.hset("test:1", "name", "James")
170+
>>> r.hset("test:1", "lastname", "Brown")
171+
172+
>>> # Query with default DIALECT 2
173+
>>> query = "@name: James Brown"
174+
>>> q = Query(query)
175+
>>> res = r.ft().search(q)
176+
177+
>>> # Query with explicit DIALECT 1
178+
>>> query = "@name: James Brown"
179+
>>> q = Query(query).dialect(1)
180+
>>> res = r.ft().search(q)
181+
```
182+
183+
You can find further details in the [query dialect documentation](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/dialects/).
184+
185+
---------------------------------------------
157186

158187
### Author
159188

redis/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def int_or_str(value):
4242
return value
4343

4444

45-
__version__ = "5.2.1"
45+
__version__ = "6.0.0b1"
4646
VERSION = tuple(map(int_or_str, __version__.split(".")))
4747

4848

0 commit comments

Comments
 (0)