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

Bug: Fix Character Escaping on Generic Searches #69

Closed
ally-jarrett opened this issue Jul 13, 2022 · 0 comments
Closed

Bug: Fix Character Escaping on Generic Searches #69

ally-jarrett opened this issue Jul 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ally-jarrett
Copy link
Contributor

ally-jarrett commented Jul 13, 2022

Currently (0.5.1) Generic searches are broken as wilcard and special characters will be escaped.

For Example:

Consider the repository method:

Page<Entity> search(String searchCriteria, Pageable pageable);

Using Search terms such as:

repository.search("The Matrix", pageRequest); // search for terms "The" AND "Matrix"
repository.search("Avenge*", pageRequest); // prefix search for terms beginning with "Avenge"
repositry.search("\"James Bond\"", pageRequest); // Search explicitly for the term "James Bond"

redis-om will produce the following queries params:

"FT.SEARCH" "<INDEX>" "The\\ Matrix" 
"FT.SEARCH" "<INDEX>" "Avenge\\* 
"FT.SEARCH" "<INDEX>" "\\\"James\\ Bond\\\""

Escaping for generic searches should be left to the calling client rather than the redis-om lib.

@bsbodden bsbodden self-assigned this Jul 14, 2022
@bsbodden bsbodden added bug Something isn't working labels Jul 14, 2022
bsbodden added a commit to bsbodden/redis-om-spring that referenced this issue Jul 15, 2022
bsbodden added a commit to bsbodden/redis-om-spring that referenced this issue Jul 15, 2022
bsbodden added a commit to bsbodden/redis-om-spring that referenced this issue Jul 18, 2022
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

2 participants