You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-3
Original file line number
Diff line number
Diff line change
@@ -54,15 +54,16 @@ Looking for a high-level library to handle object mapping? See [redis-om-python]
54
54
55
55
## Supported Redis Versions
56
56
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).
58
58
59
59
The table below highlights version compatibility of the most-recent library versions and redis versions.
60
60
61
61
| Library version | Supported redis versions |
62
62
|-----------------|-------------------|
63
63
| 3.5.3 | <= 6.2 Family of releases |
64
64
| >= 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 |
66
67
67
68
68
69
## Usage
@@ -152,8 +153,36 @@ The following example shows how to utilize [Redis Pub/Sub](https://redis.io/docs
### Redis’ search and query capabilities default dialect
155
157
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/).
0 commit comments