java - Lucene 6.4.1 special character equal sign "=" not escaped by QueryParser.escape(...) -


i'm working lucene 6.4.1 , exception input containing equals sign "=":

caused by: invalid_syntax_cannot_parse: syntax error, cannot parse =:   @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.generateparseexception(standardsyntaxparser.java:1030) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.jj_consume_token(standardsyntaxparser.java:912) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.clause(standardsyntaxparser.java:462) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.modclause(standardsyntaxparser.java:279) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.conjquery(standardsyntaxparser.java:210) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.disjquery(standardsyntaxparser.java:180) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.query(standardsyntaxparser.java:133) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.toplevelquery(standardsyntaxparser.java:114) @ org.apache.lucene.queryparser.flexible.standard.parser.standardsyntaxparser.parse(standardsyntaxparser.java:62) @ org.apache.lucene.queryparser.flexible.core.queryparserhelper.parse(queryparserhelper.java:245) @ org.apache.lucene.queryparser.flexible.standard.standardqueryparser.parse(standardqueryparser.java:159) 

i know there escape lucene special characters with

queryparser.escape(...) 

but why not equal sign? i'm looking flexible way not escape self written code.

you using flexible standardqueryparser (org.apache.lucene.queryparser.flexible.standard.standardqueryparser), escaping using classic queryparser (org.apache.lucene.queryparser.classic.queryparser). equal sign not part of classic queryparser syntax, , not escaped queryparser.escape


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -