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

ftSearch does not work with wildcard search #61

Open
adamzrk opened this issue Oct 14, 2024 · 0 comments
Open

ftSearch does not work with wildcard search #61

adamzrk opened this issue Oct 14, 2024 · 0 comments

Comments

@adamzrk
Copy link

adamzrk commented Oct 14, 2024

This query:
ft.search json:search "@field: w'fulltext*5d13e891162a456babf2fd9b864df96d'" DIALECT 2
when executed in redis-cli returns correct data.
According to https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/query_syntax/:
"In DIALECT 2 or greater, wildcard pattern matches are expressed as "w'foobar?'". Note the use of double quotes to contain the w pattern."
Double quotes are required so I try to add them to the query at the begging and the end of the query:
query.append(String.format("\"@field: w'%s", text) .append("*").append(role).append("'\""));
but when running:
`connection.sync().ftSearch("json:search" query);

the following error is returned:
io.lettuce.core.RedisCommandExecutionException: Syntax error at offset 1 near text
lettucemod version 3.8.1

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

No branches or pull requests

1 participant