Apache Lucene open-source search software
LUCENE-5068: QueryParserUtil.escape() does not escape forward slash.
Steven Rowe429bbe69509b
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 06dc36c8330..3603295a581 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -188,6 +188,9 @@ Bug Fixessetter in ConcurrentMergePolicy: setMaxMergesAndThreads. Previously thesesetters 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)Optimizationsdiff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.javaindex b9a7fe6021b..fd363f5aba7 100644--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.java+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.java@@ -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);