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

QueryUtils is not escaping the space character #512

Open
fabrizio-cannizzaro opened this issue Oct 3, 2024 · 1 comment
Open

QueryUtils is not escaping the space character #512

fabrizio-cannizzaro opened this issue Oct 3, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@fabrizio-cannizzaro
Copy link

fabrizio-cannizzaro commented Oct 3, 2024

QueryUtils is not escaping the space character
When a parameter containing a space (" ") is passed this exception is raised
In this test the parameter was "In Camera"

Suppressed: redis.clients.jedis.exceptions.JedisDataException: Syntax error at offset 63 near Camera
at redis.clients.jedis.Protocol.processError(Protocol.java:105)
at redis.clients.jedis.Protocol.process(Protocol.java:162)
at redis.clients.jedis.Protocol.read(Protocol.java:221)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:351)
at redis.clients.jedis.Connection.getOne(Connection.java:333)
at redis.clients.jedis.Connection.executeCommand(Connection.java:138)
at redis.clients.jedis.executors.DefaultCommandExecutor.executeCommand(DefaultCommandExecutor.java:24)
at redis.clients.jedis.UnifiedJedis.executeCommand(UnifiedJedis.java:244)
at redis.clients.jedis.UnifiedJedis.ftSearch(UnifiedJedis.java:3705)
at com.redis.om.spring.ops.search.SearchOperationsImpl.search(SearchOperationsImpl.java:46)
at com.redis.om.spring.search.stream.SearchStreamImpl.executeQuery(SearchStreamImpl.java:527)
at com.redis.om.spring.search.stream.SearchStreamImpl.resolveStream(SearchStreamImpl.java:577)
at com.redis.om.spring.search.stream.SearchStreamImpl.close(SearchStreamImpl.java:446)
at ec.ep.pericles.imv.bidao.impl.MeetingDocumentDaoImpl.search(MeetingDocumentDaoImpl.java:31)
... 185 common frames omitted

public static final Set TAG_ESCAPE_CHARS = Set.of(',', '.', '<', '>', '{', '}', '[', ']', '"', ''', ':', ';', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '+', '=', '~', '|', '/');

@bsbodden bsbodden self-assigned this Nov 19, 2024
@bsbodden
Copy link
Contributor

@fabrizio-cannizzaro sorry for the late reply, to escape spaces also use the form tring escape(String text, boolean querying) with querying set to true

@bsbodden bsbodden added the question Further information is requested label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants