java – 没有段*文件找到
发布时间:2020-12-14 05:28:42 所属栏目:Java 来源:网络整理
导读:我需要访问lucene索引(通过使用Nutch爬网几个网页创建),但是它给出了上面显示的错误: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/home/path: files: at org.apache.lucene.index.SegmentInfos$FindS
我需要访问lucene索引(通过使用Nutch爬网几个网页创建),但是它给出了上面显示的错误:
java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@/home/<path>: files: at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:516) at org.apache.lucene.index.IndexReader.open(IndexReader.java:185) at org.apache.lucene.index.IndexReader.open(IndexReader.java:148) at DictionaryGenerator.generateDict(DictionaryGenerator.java:24) at DictionaryGenerator.main(DictionaryGenerator.java:56) 我上了谷歌,但给出的理由不符合要求. 解决方法
基本上,错误消息说Lucene在索引目录中找不到正确的文件.我建议检查以下内容:
>验证索引目录的路径符合您的想法. 如果所有这些都没有帮助,请发布代码的索引部分. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |