Skip to content

Commit 157e1d8

Browse files
committed
Add UnstableResp3 to docs
1 parent 1ed936e commit 157e1d8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,20 @@ 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 using unstable RESP3 in the RediSearch module, use RawResult() or RawVal() to handle responses:
197+
198+
```go
199+
res1, err := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawResult()
200+
val1 := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawVal()
201+
```
202+
189203
## Contributing
190204

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

0 commit comments

Comments
 (0)