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

FT.SEARCH Query Syntax incomplete #2291

Closed
kurtisane opened this issue Dec 11, 2023 · 3 comments
Closed

FT.SEARCH Query Syntax incomplete #2291

kurtisane opened this issue Dec 11, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@kurtisane
Copy link

kurtisane commented Dec 11, 2023

Describe the bug
I'm running the example project of Redis OM for .Net.
https://github.com/redis/redis-om-dotnet/tree/main/examples/Redis.OM.CreateIndexStore

Using the Redis Stack everything works fine and the Program can run without any issues.
docker run -p 6379:6379 -p 8001:8001 redis/redis-stack

When running Dragonfly I'm facing a issue during :
var newton = await customers.Where(x => x.FullName == "Albert Einstein").FirstOrDefaultAsync();

I have debugged it a little and got down to the command that is send to the Redis/Dragonfly Server:
"FT.SEARCH" "customer-idx" "(@FullName:{Albert\\ Einstein})" "LIMIT" "0" "1" // What I see in the RedisInsight Profiler
or
FT.SEARCH customer-idx (@FullName:{Albert\ Einstein}) LIMIT 0 1 // What I see in Code

This results in a Query Syntax error on Dragonfly.
According to the docs of Redis this is not how a exact match for a query should look like:
https://redis.io/docs/interact/search-and-query/query/exact-match/

But at the same time the Redis Server is capable of handling it. It seems to be the escaping of spaces in those search parameters are handled differently and the braces around the whole query. Cuz this works in Dragonfly but not on Redis :
FT.SEARCH customer-idx "@FullName:{\"Albert Einstein\"}" LIMIT 0 1

Error on Redis when running this command :
"Syntax error at offset 11 near FullName"

Issue on Redis OM for that:
redis/redis-om-dotnet#425

To Reproduce
Steps to reproduce the behavior:

  1. Run the example project.

Expected behavior
Work the same way as Redis Server

Environment (please complete the following information):

  • OS: Windows
  • Containerized?: Docker Compose
  • Dragonfly Version: 1.13.0
@kurtisane kurtisane added the bug Something isn't working label Dec 11, 2023
@dranikpg
Copy link
Contributor

Hi! Thanks for reporting this issue, we'll fix it soon

The syntax is indeed a bit weird, but it is what it is... 🙂 The libraries don't work with qutoes

@dranikpg dranikpg self-assigned this Dec 16, 2023
@chakaz
Copy link
Collaborator

chakaz commented Aug 11, 2024

Hey @dranikpg, in case this was fixed since you updated this issue, feel free to close it

@BagritsevichStepan
Copy link
Contributor

The issue has been moved to another ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants