| Summary: | [server] search does not handle special characters | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Anthony Hunter <ahunter.eclipse> |
| Component: | Server | Assignee: | Anthony Hunter <ahunter.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 450017 | ||
(In reply to Anthony Hunter from comment #0) > If you search for "function()" , grep search returns zero matches The problem is that the Orion file client performs an operation that escapes all characters in the string that require escaping in a Lucene queries. We need to undo since we are not Lucene. Since during the first stages we want to leave the Orion client as is, I have added a undoLuceneEscape() method to undo the escapes on the server. You can now successfully select a random line of text and search for it. This is pushed with commit: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=40f0f8ab0748ae2ad2aede8f485138caf904ce51 |
If you search for "function()" , grep search returns zero matches The Orion client is encoding the search string to be "function\(\)" and the grep search does not like the back slashes. Since you are sending "something" in double quotes, the search API says you wanted matches of the exact string within the quotes, which in this case should include the back slashes. I guess I need to replace '\(' with '(', but this means you cannot search for "function\(\)". I am not sure if this is what we expect. This is maybe a duplicate of Bug 444487.