Lucene错误1:Lucene创建索引后,进行搜索时,出现错误

场景:Lucene创建索引后,进行搜索时,出现以下错误:

no segments* file found in org.apache.lucene.store.SimpleFSDirectory@D:\test

解决方式:在创建索引时,添加:writer.commit();

猜你喜欢

转载自grey2.iteye.com/blog/1807433