Compare commits

...

5 Commits

Author SHA1 Message Date
ofekshenawa 08e67bca3c
Merge e9598a8665 into 80c9f5bb77 2024-11-12 23:39:22 +00:00
ofekshenawa e9598a8665
Merge branch 'master' into add-unstableresp3-to-docs 2024-11-13 01:39:20 +02:00
ofekshenawa 5bf18bfb17 Explain more about SetVal 2024-11-13 01:38:47 +02:00
ofekshenawa a7d711aff8 Add RawVal and RawResult to wordlist 2024-10-30 12:59:51 +02:00
ofekshenawa 157e1d85eb Add UnstableResp3 to docs 2024-10-29 23:35:23 +02:00
2 changed files with 17 additions and 0 deletions

View File

@ -62,3 +62,5 @@ RedisStack
RedisGears
RedisTimeseries
RediSearch
RawResult
RawVal

View File

@ -186,6 +186,21 @@ 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 UnstableResp3 mode is enabled, it's necessary to use RawResult() and RawVal() to retrieve a raw data.
Since, raw response is the only option for unstable search commands Val() and Result() calls wouldn't have any affect on them:
```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!