Skip to content

Commit 72283c0

Browse files
committed
Updating the readme and lib version to contain the changes from the latest stable release
1 parent e9f22dd commit 72283c0

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
lines changed

README.md

Lines changed: 39 additions & 4 deletions
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,42 @@ 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+
>>> from redis.commands.search.field import TextField
165+
>>> from redis.commands.search.query import Query
166+
>>> from redis.commands.search.index_definition import IndexDefinition
167+
>>> import redis
168+
169+
>>> r = redis.Redis(host='localhost', port=6379, db=0)
170+
>>> r.ft().create_index(
171+
>>> (TextField("name"), TextField("lastname")),
172+
>>> definition=IndexDefinition(prefix=["test:"]),
173+
>>> )
174+
175+
>>> r.hset("test:1", "name", "James")
176+
>>> r.hset("test:1", "lastname", "Brown")
177+
178+
>>> # Query with default DIALECT 2
179+
>>> query = "@name: James Brown"
180+
>>> q = Query(query)
181+
>>> res = r.ft().search(q)
182+
183+
>>> # Query with explicit DIALECT 1
184+
>>> query = "@name: James Brown"
185+
>>> q = Query(query).dialect(1)
186+
>>> res = r.ft().search(q)
187+
```
188+
189+
You can find further details in the [query dialect documentation](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/dialects/).
190+
191+
---------------------------------------------
157192

158193
### Author
159194

@@ -169,4 +204,4 @@ Special thanks to:
169204
system.
170205
- Paul Hubbard for initial packaging support.
171206

172-
[![Redis](./docs/_static/logo-redis.svg)](https://redis.io)
207+
[![Redis](./docs/_static/logo-redis.svg)](https://redis.io)

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2+
# image tag 8.0-RC2-pre is the one matching the 8.0 GA release
23
x-client-libs-stack-image: &client-libs-stack-image
3-
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_STACK_IMAGE_TAG:-rs-7.4.0-v2}"
4+
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_STACK_IMAGE_TAG:-8.0-RC2-pre}"
45

56
x-client-libs-image: &client-libs-image
6-
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_IMAGE_TAG:-7.4.2}"
7+
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_IMAGE_TAG:-8.0-RC2-pre}"
78

89
services:
910

redis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def int_or_str(value):
4545
return value
4646

4747

48-
__version__ = "5.2.1"
48+
__version__ = "6.0.0"
4949
VERSION = tuple(map(int_or_str, __version__.split(".")))
5050

5151

0 commit comments

Comments
 (0)