From 72a9df1b552f7b0f828f4b64f121f9a8ac6262ec Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Tue, 24 Feb 2009 02:11:13 +0000 Subject: [PATCH] SOLR-1034 -- ClientUtils.escapeQuery should escape ; git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@747260 13f79535-47bb-0310-9956-ffa450edef68 --- src/solrj/org/apache/solr/client/solrj/util/ClientUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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('\\'); }