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

Full-text search errors for prefix match #3014

Open
okimonhgb opened this issue May 6, 2024 · 6 comments
Open

Full-text search errors for prefix match #3014

okimonhgb opened this issue May 6, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@okimonhgb
Copy link

Describe the bug
Fulltext search gives error if I want to search for words that match a given prefix:
FT.SEARCH idxe:content "@text:football*"
"ERR Query syntax error"

To Reproduce
Steps to reproduce the behavior:

  1. Insert records : A json type key with a text field called "text".
  2. Create a full-text index: FT.CREATE indxe:content ON JSON PREFIX 1 contents: SCHEMA
    $.text AS text TEXT
  3. Query records using : FT.SEARCH idxe:content "@text:football*"
  4. It gives error: "ERR Query syntax error"

Expected behavior
for exact search I get no error:
FT.SEARCH idxe:content "@text:football"
My existing app. running on Redis doesn't get any error for prefix matching as expected:

https://redis.io/docs/latest/develop/interact/search-and-query/query/full-text/

...
Word prefix
You can also search for words that match a given prefix.

FT.SEARCH index "prefix*"
...
<<<

Screenshots
Error with dragonfly:
image

No error with Redis:
image

Environment (please complete the following information):

  • OS: Rocky Linux 9.3 (Blue Onyx)
  • Kernel: Linux cache-maker 5.14.0-362.24.1.el9_3.0.1.x86_64 finalize blpop algorithm #1 SMP PREEMPT_DYNAMIC Thu Apr 4 22:31:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Containerized?: No
  • Dragonfly Version: v1.17.1-9d0253ca8937175d2551d9b39c26f99921f46a92

Reproducible Code Snippet
FT.CREATE indxe:content ON JSON PREFIX 1 contents: SCHEMA
$.text AS text TEXT

FT.SEARCH idxe:content "@text:football*"

Minimal code snippet to reproduce this bug

FT.SEARCH idxe:content "@text:football*"

Additional context
Add any other context about the problem here.

@okimonhgb okimonhgb added the bug Something isn't working label May 6, 2024
@chakaz
Copy link
Collaborator

chakaz commented May 6, 2024

@dranikpg can you kindly take a look? 🙏

@romange
Copy link
Collaborator

romange commented May 6, 2024

@okimonhgb is it full text search? it's not supported. indeed I do not see that it is clearly specified in the documentation.

@okimonhgb
Copy link
Author

@romange yes it is full text search. It works for exact word searches but seems doesn't support word prefixes.
Is it planned to be supported in near future? Is there any workaround? We want to use replace our redis instance with dragonfly but this problem breaks existing codes.

@romange
Copy link
Collaborator

romange commented May 6, 2024

Unfortunately it won't be implemented in near future.

@okimonhgb
Copy link
Author

Ok. I understand there is also no workaround?
So we should plan according to this.
Can I keep this issue open?
Best regards,

@romange
Copy link
Collaborator

romange commented May 6, 2024

Sure :)

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

3 participants