Example usage for org.apache.solr.parser SolrQueryParserBase escape

List of usage examples for org.apache.solr.parser SolrQueryParserBase escape

Introduction

In this page you can find the example usage for org.apache.solr.parser SolrQueryParserBase escape.

Prototype

public static String escape(String s) 

Source Link

Document

Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding \.

Usage

From source file:nl.knaw.huygens.facetedsearch.SolrUtils.java

License:Open Source License

public static String escapeFacetValue(String string) {
    return SolrQueryParserBase.escape(string).replaceAll(" ", "\\\\ ");
}

From source file:nl.knaw.huygens.solr.SolrUtils.java

License:Open Source License

public static String escapeFacetId(String string) {
    return SolrQueryParserBase.escape(string).replaceAll(" ", "\\\\ ");
}