+ - & | ! ( ) { } [ ] ^ ~ * ? : \ 还有 AND OR NOT
这些关键字在查询前要进行过滤或替换或转义
否则将出现如下错误:
Exception in thread "main" org.apache.lucene.queryParser.ParseException: Cannot parse '
': Encountered "<EOF>" at line 1, column 4.
Was expecting one of:
<NOT> ...
"+" ...
"-" ...
"(" ...
"*" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
"[" ...
"{" ...
<NUMBER> ...