www.ctrt.net > luCEnE3.5一段时间后出现空指针错误

luCEnE3.5一段时间后出现空指针错误

java.lang.NullPointerException at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206) at com.gzhz.lucene.LuceneUtil.booleanSearchIndexByVo(LuceneUtil.java:619) at com.gzhz.business.LuceneBD.booleanSearchIndexB...

lucene 3.5中使用writer.forceMerge(1),来优化索引,即lucene3.5中使用writer.forceMerge(1)来替换optimize()方法.

我用过lucene 3.6,感觉你这种需求是可以用BooleanQuery实现的,这样取出来的结果集实际上就是一个交集。代码如下: BooleanQuery query =new BooleanQuery(); query.add(new TermQuery(new Term("name","zhangsan")), Occur.MUST); query.add(n...

网站地图

All rights reserved Powered by www.ctrt.net

copyright ©right 2010-2021。
www.ctrt.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com