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

Fix bug in BuildEqualityPredicate #468

Closed
wants to merge 1 commit into from
Closed

Conversation

ahmedisam99
Copy link
Contributor

@ahmedisam99 ahmedisam99 commented Jul 21, 2024

When adding quotes to the predicate, redis throws/returns the following error:

"Invalid argument(s): Closing quote must be followed by a space or nothing at all."

This works ✅ :
"FT.SEARCH" "idx" @Name:"Test"

But this does not 🚫:
"FT.SEARCH" "idx" (@Name:"Test")

So I thought it would be safer to remove the quotes, since the query still works without them and it is already implemented in translating string.Contains (I actually fell back to using string.Contains because of this inconvenience)

Another thing to note that even though the mentioned query did not work and returned an error when running the command in redis-cli, the code did not throw an exception and just returned empty results

When adding quotes to the predicate, redis throws/returns the following error:

```
"Invalid argument(s): Closing quote must be followed by a space or nothing at all."
```

This works:
`"FT.SEARCH" "idx" @name:"Test"`

But this does not:
`"FT.SEARCH" "idx" (@name:"Test")`

So I thought it would be safer to remove the quotes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant