mirror of https://github.com/apache/lucene.git
SOLR-1034 -- ClientUtils.escapeQuery should escape ;
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@747260 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
85b2baeb47
commit
72a9df1b55
|
@ -180,9 +180,9 @@ public class ClientUtils
|
|||
for (int i = 0; i < s.length(); i++) {
|
||||
char c = s.charAt(i);
|
||||
// These characters are part of the query syntax and must be escaped
|
||||
if (c == '\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'
|
||||
if (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