mirror of https://github.com/apache/lucene.git
LUCENE-2604: add '/' to the list of chars in the various escape functions
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1294965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
29f9a15de5
commit
29a7c260fe
|
@ -1187,7 +1187,7 @@ public abstract class QueryParserBase {
|
|||
// These characters are part of the query syntax and must be escaped
|
||||
if (c == '\\' || c == '+' || 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);
|
||||
|
|
|
@ -551,7 +551,7 @@ public class SolrPluginUtils {
|
|||
for (int i = 0; i < s.length(); i++) {
|
||||
char c = s.charAt(i);
|
||||
if (c == '\\' || c == '!' || c == '(' || c == ')' ||
|
||||
c == ':' || c == '^' || c == '[' || c == ']' ||
|
||||
c == ':' || c == '^' || c == '[' || c == ']' || c == '/' ||
|
||||
c == '{' || c == '}' || c == '~' || c == '*' || c == '?'
|
||||
) {
|
||||
sb.append('\\');
|
||||
|
|
|
@ -194,7 +194,7 @@ public class ClientUtils
|
|||
// These characters are part of the query syntax and must be escaped
|
||||
if (c == '\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'
|
||||
|| c == '^' || c == '[' || c == ']' || c == '\"' || c == '{' || c == '}' || c == '~'
|
||||
|| c == '*' || c == '?' || c == '|' || c == '&' || c == ';'
|
||||
|| c == '*' || c == '?' || c == '|' || c == '&' || c == ';' || c == '/'
|
||||
|| Character.isWhitespace(c)) {
|
||||
sb.append('\\');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue