From 157e1d85eb4270376b5d022aef0e2990d9c316f2 Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Tue, 29 Oct 2024 23:35:23 +0200 Subject: [PATCH 1/2] Add UnstableResp3 to docs --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 37714a97..0650ed5f 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,20 @@ rdb := redis.NewClient(&redis.Options{ #### Unstable RESP3 Structures for RediSearch Commands When integrating Redis with application functionalities using RESP3, it's important to note that some response structures aren't final yet. This is especially true for more complex structures like search and query results. We recommend using RESP2 when using the search and query capabilities, but we plan to stabilize the RESP3-based API-s in the coming versions. You can find more guidance in the upcoming release notes. +To enable unstable RESP3, set the option in your client configuration: + +```go +redis.NewClient(&redis.Options{ + UnstableResp3: true, + }) +``` +**Note:** When using unstable RESP3 in the RediSearch module, use RawResult() or RawVal() to handle responses: + +```go +res1, err := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawResult() +val1 := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawVal() +``` + ## Contributing Please see [out contributing guidelines](CONTRIBUTING.md) to help us improve this library! From a7d711aff83480f87781ede481b4f81c55b3b49f Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Wed, 30 Oct 2024 12:59:51 +0200 Subject: [PATCH 2/2] Add RawVal and RawResult to wordlist --- .github/wordlist.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index c200c60b..c45f652b 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -62,3 +62,5 @@ RedisStack RedisGears RedisTimeseries RediSearch +RawResult +RawVal \ No newline at end of file