Skip to content

Commit 930d904

Browse files
authored
Add guidance on unstable RESP3 support for RediSearch commands to README (#3177)
* Add UnstableResp3 to docs * Add RawVal and RawResult to wordlist * Explain more about SetVal * Add UnstableResp to wordlist
1 parent 8b1073d commit 930d904

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/wordlist.txt

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ stunnel
5454
SynDump
5555
TCP
5656
TLS
57+
UnstableResp
5758
uri
5859
URI
5960
url
@@ -62,3 +63,5 @@ RedisStack
6263
RedisGears
6364
RedisTimeseries
6465
RediSearch
66+
RawResult
67+
RawVal

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,21 @@ rdb := redis.NewClient(&redis.Options{
186186
#### Unstable RESP3 Structures for RediSearch Commands
187187
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.
188188

189+
To enable unstable RESP3, set the option in your client configuration:
190+
191+
```go
192+
redis.NewClient(&redis.Options{
193+
UnstableResp3: true,
194+
})
195+
```
196+
**Note:** When UnstableResp3 mode is enabled, it's necessary to use RawResult() and RawVal() to retrieve a raw data.
197+
Since, raw response is the only option for unstable search commands Val() and Result() calls wouldn't have any affect on them:
198+
199+
```go
200+
res1, err := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawResult()
201+
val1 := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawVal()
202+
```
203+
189204
## Contributing
190205

191206
Please see [out contributing guidelines](CONTRIBUTING.md) to help us improve this library!

0 commit comments

Comments
 (0)