src/main/java/io/chatpal/solr/ext/handler/QueryHelper.java
/**
     * Escapes <a href=
     * "https://lucene.apache.org/solr/guide/7_5/the-standard-query-parser.html">Lucene
     * query parser syntax</a> not allowed in the {@link ChatpalParams#PARAM_TEXT} parameter
     * 
     * Allowed are <ul>
     * <li> <code>*</code> for prefix/infix
     * <li> <code>"</code> for phrase queries
     * <li> <code>-</code> for negation and <code>+</code> for MUST
     * <li> white spaces are also not escaped 
     * </ul>
     */
Escapes Lucene
query parser syntax not allowed in the  ChatpalParams#PARAM_TEXT parameter

Allowed are 
 * for prefix/infix
 " for phrase queries
 - for negation and + for MUST
 white spaces are also not escaped

Escapes Lucene query parser syntax not allowed in the ChatpalParams#PARAM_TEXT parameter Allowed are * for prefix / infix " for phrase queries - for negation and + for MUST white spaces are also not escaped
public static String cleanTextQuery(String s) {
        if (s == null) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (c == '\\' || c == '!' || c == '(' || c == ')' || c == ':' || c == '^'
                    || c == '[' || c == ']' || c == '{' || c == '}' || c == '~' || c == '|' || c == '&'
                    || c == '?' || c == ';' || c == '/') {
                sb.append('\\');
            }
            sb.append(c);
        }
        return sb.toString();
    }
public static String cleanTextQuery ( String s ) { if ( s == null ) { return null ; } StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { char c = s . charAt ( i ) ; if ( c == '\\' || c == '!' || c == '(' || c == ')' || c == ':' || c == '^' || c == '[' || c == ']' || c == '{' || c == '}' || c == '~' || c == '|' || c == '&' || c == '?' || c == ';' || c == '/' ) { sb . append ( '\\' ) ; } sb . append ( c ) ; } return sb . toString ( ) ; }
Escapes <a href
 "https://lucene.apache.org/solr/guide/7_5/the-standard-query-parser.html">Lucene
 query parser syntax</a> not allowed in the {@link ChatpalParams#PARAM_TEXT} parameter
Escapes <a href " https : // lucene . apache . org / solr / guide / 7_5 / the - standard - query - parser . html " > Lucene query parser syntax< / a > not allowed in the { @link ChatpalParams#PARAM_TEXT } parameter
// These characters are part of the query syntax and NOT allowed in // the 'text' parameter. // So they must be escaped // NOTE:  //   * we do allow * for prefix/infix //   * we do allow " phrase queries //   * we do allow - for negation and + for MUST //   * we do not escape white spaces as we do want OR for multiple terms