On Feb 23, 2009, at 9:13 PM, Chris Hostetter wrote:


: server:/solr/select?q=field:"'anything' anything can go here\;" -- > No
: problem (but ClientUtils's escape does not escape semicolons.)

ClientUtils doesn't escape it because it's not a special character in the
SolrQueryParser.


I went ahead and added it since it does not hurt anything to escape more things -- it just makes the final string ugly.

In 1.3 the escape method covered everything:

http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.3.0/client/java/solrj/src/org/apache/solr/client/solrj/util/ClientUtils.java

 public static String escapeQueryChars( String input )
  {
    Matcher matcher = escapePattern.matcher( input );
    return matcher.replaceAll( "\\\\$1" );
  }


Reply via email to