diff --git a/src/solrj/org/apache/solr/client/solrj/util/ClientUtils.java b/src/solrj/org/apache/solr/client/solrj/util/ClientUtils.java index bf65a1ae757..2f965b33fff 100644 --- a/src/solrj/org/apache/solr/client/solrj/util/ClientUtils.java +++ b/src/solrj/org/apache/solr/client/solrj/util/ClientUtils.java @@ -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('\\'); }