建立索引时no segments* file found 的问题
来源:互联网 发布:我的世界手机版js制作 编辑:程序博客网 时间:2024/06/07 08:26
lucene创建索引中的构造函数IndexWriter(String path, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl) ,这里的boolean create参数的意思并非是否创建索引,而是覆盖还是追加的意思。原文见官方文档:create - true to create the index or overwrite the existing one; false to append to the existing index
所以。当该参数为false,而所以目录下由不存在索引的时候,便会产生该异常。
create - true to create the index or overwrite the existing one; false to append to the existing index
true:创建新的索引或者覆盖现有索引
false:追加索引到现有索引。
所以。当该参数为false,而所以目录下由不存在索引的时候,便会产生该异常。
java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.FSDirectory@D:/lucenedir/index: files:
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:604)
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:272)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1072)
at org.apache.lucene.index.IndexWriter.(IndexWriter.java:550)
针对索引建立index = new IndexWriter(new File(indexDir), new StandardAnalyzer(),
!incremental);
只需要将本语句中的!incremental设置成true就可以全新穿件索引的三个文件。
。
- 建立索引时no segments* file found 的问题
- lucene 索引出错 no segments* file found in org.apache.lucene.store.MMapDirectory
- no segments* file found in org.apache.lucene.store.SimpleFSDirectory
- *** No SConstruct file found问题及编译mongodb驱动时的一些问题总结
- no segments* file 异常原因
- lucene:no segments* file found in org.apache.lucene.store.FSDirectory@
- lucene 错误 no segments* file found in org.apache.lucene.store.FSDirectory@ write.lock
- lucene:no segments* file found in org.apache.lucene.store.FSDirectory@
- lucene:no segments* file found in org.apache.lucene.store.FSDirectory@
- luence基础学习——no segments* file found in org.apache.lu异常处理
- 使用jeecms 进行文字搜索,报java.io.FileNotFoundException: no segments* file found...
- Lucene错误:no segments* file found in org.apache.lucene.store.RAMDirectory
- Lucene 使用no segments* file 异常原因
- lucene建索引时的一个"Can't rename segments.new to segments"异常的原因
- lucene建索引时的一个"Can't rename segments.new to segments"异常的原因
- jdbc mysql和sql server 建立连接代码 / tomcat+jdbc会出现的问题No suitable driver found for问题,
- INIT: No Inittab file found
- INIT: No Inittab file found
- ymPrompt消息提示组件4.0版[2009-03-02]DEMO演示及使用简介
- Java+PHP整合=混血新宠儿
- jquery中手风琴效果实用源代码
- 【反射】基于反射的实际应用——任意对象数组的排序
- request 获取访问IP
- 建立索引时no segments* file found 的问题
- SendMessage 和 PostMessage 的区别
- CryENGINE Feathure
- 用了皮肤控件之后,报错:容量超出了最大容量 参数名:capacity
- jquery-dialog对话框的实现
- 超链接点击无效的实现方式
- 怎么使游戏按下home的时候进入暂停状态 然后再次进入点击按钮恢复?
- Android笔记
- stagefright中#define里的#和##的作用