2
我不小心刪除了我的程序的Lucence索引文件夾。當我運行我的程序時,顯示爲...如何在Lucene索引中重新創建刪除的段文件?
Exception in thread "main" org.apache.lucene.index.IndexNotFoundException: no segments* file found in [email protected]:\fbl\org.fazlan.lucene.ms.demo\src\main\resources\index2 [email protected]: files: [write.lock, _0.fdt, _0.fdx]
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:801)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:52)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:66)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:291)
at org.fazlan.lucene.demo.Searcher.<init>(Searcher.java:28)
at org.fazlan.lucene.demo.FileIndexApplication.main(FileIndexApplication.java:50)
我該怎麼辦?我通過互聯網搜索,但無法找到任何解決方案?有什麼方法可以用刪除的段文件重建索引嗎?