Skip to content
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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

RediSearch Support #2801

wants to merge 16 commits into from

Conversation

ofekshenawa
Copy link
Collaborator

No description provided.

search_commands.go Outdated Show resolved Hide resolved
search_commands.go Outdated Show resolved Hide resolved
search_commands.go Outdated Show resolved Hide resolved
search_commands.go Outdated Show resolved Hide resolved
var client *redis.Client

BeforeEach(func() {
client = redis.NewClient(&redis.Options{Addr: ":6379"})
Copy link
Contributor

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"))
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Collaborator Author

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.

@chayim chayim added the feature label Dec 17, 2023
stivesso added a commit to stivesso/articles-search that referenced this pull request Feb 12, 2024
@jiangtao244
Copy link

how is this mr going?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants