-
Notifications
You must be signed in to change notification settings - Fork 96
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
Handle search aliased fields with special characters #433
Comments
@bsbodden Hi Brian, your assistance is very much needed. Sorry for disturbance. |
No problem at all. Until now the expectation was for aliases to be well-formed JavaBean names, I assume that whatever is writing to that cache forces that |
Thanks for a prompt response. Yes, in my case, some other application(s) will be writing to Redis (cache), I have no influence on the format on how will end up, but for now it is User-Name or with multiple dashes Acct-Multi-Session-Id. |
Hi, thanks for a quick fix/enhancement! So we can expect 0.9.1 version on Maven Central any time soon? |
0.9.1 coming out today! |
I have Spring Boot 3.2.3 and Spring Redis OM 0.9.0. Simple entity is defined as:
Reproducible example is here
My application will only be querying for data in Redis, so no inserts/deletes. Indexes are created properly I would say:
"FT.CREATE" "com.example.demo.entity.StudentIdx" "ON" "HASH" "PREFIX" "1" "com.example.demo.entity.Student:" "SCHEMA" "userName" "AS" "User-Name" "TAG" "SEPARATOR" "|" "eventTimestamp" "AS" "eventTimestamp" "NUMERIC" "id" "AS" "id" "NUMERIC" "SORTABLE"
So let say that some other app executed this query:
"hset" "com.example.demo.entity.Student:-3247060323725991617" "User-Name" "pera"
Then my search query by username throws exception:
On monitor, dash (-) within User-Name is not escaped, this is what the library is executing:
"FT.SEARCH" "com.example.demo.entity.StudentIdx" "@User-Name:{pera}" "LIMIT" "0" "10000"
it should be executed as:
"FT.SEARCH" "com.example.demo.entity.StudentIdx" "@User\\-Name:{pera}" "LIMIT" "0" "10000"
Am I missing something or this is a bug?
The text was updated successfully, but these errors were encountered: