-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RediSearch Support #2801
base: master
Are you sure you want to change the base?
RediSearch Support #2801
Conversation
var client *redis.Client | ||
|
||
BeforeEach(func() { | ||
client = redis.NewClient(&redis.Options{Addr: ":6379"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you get the Addr from the same client we already use?
Expect(err).NotTo(HaveOccurred()) | ||
searchResult := res.(map[interface{}]interface{}) | ||
Expect(searchResult["total_results"]).To(BeEquivalentTo(int64(2))) | ||
Expect(searchResult["results"].([]interface{})[0].(map[interface{}]interface{})["id"]).To(BeEquivalentTo("doc2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks uncastable. can you try?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO points to the need for helpers on the return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handling unstable return types like in the FTSearch function is challenging due to Go's static typing. Creating a helper function to determine the return type isn’t feasible due to the dynamic nature of the return type and the infinite possible variations.
Ref: https://github.com/redis/go-redis/blob/e3d522fef42f0e0dea0ac228cefaac65df2f0e41/search_test.go redis/go-redis#2801 Signed-off-by: Steve ESSO <stivesso@gmail.com>
how is this mr going? |
No description provided.