LUCENE-5068: QueryParserUtil.escape() does not escape forward slash.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1498770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2013-07-02 03:53:46 +00:00
parent 1c81ad7022
commit 429bbe6950
2 changed files with 4 additions and 1 deletions

View File

@ -188,6 +188,9 @@ Bug Fixes
setter in ConcurrentMergePolicy: setMaxMergesAndThreads. Previously these
setters would not work unless you invoked them very carefully.
(Robert Muir, Shai Erera)
* LUCENE-5068: QueryParserUtil.escape() does not escape forward slash.
(Matias Holte via Steve Rowe)
Optimizations

View File

@ -195,7 +195,7 @@ final public class QueryParserUtil {
if (c == '\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')'
|| c == ':' || c == '^' || c == '[' || c == ']' || c == '\"'
|| c == '{' || c == '}' || c == '~' || c == '*' || c == '?'
|| c == '|' || c == '&') {
|| c == '|' || c == '&' || c == '/') {
sb.append('\\');
}
sb.append(c);