- 浏览: 277605 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
somefuture:
为何有文章说asyncAppdender不支持J2ee容器ht ...
log4j 日志异步化AsyncAppender 大幅提升系统性能 -
model2012:
你用adt跑的吧,android里面是不能直接运行main方法 ...
JVM崩溃:Current thread JavaThread "CompilerThread1" daemon [_thre -
di1984HIT:
不错。学习了啊
.rmi.ConnectException: Connection refused to host: 127.0.0.1来龙去脉 -
gygwoaini:
还有可能是第3个问号没给值
索引中丢失 IN 或 OUT 参数:: 3 -
fool2011:
多谢
索引中丢失 IN 或 OUT 参数:: 3
原因:
1、手工删除索引文件导致。
2、磁盘错误导致。
解决办法:
方法一:重启lucene服务。
出错样例:
HI There I keep getting the following error when simultaneously reindexing my documents and searching through the index. java.io.IOException: Cannot overwrite: C:\index9121\_2.cfs at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:433) at org.apache.lucene.index.CompoundFileWriter.close(CompoundFileWriter.java:150) at org.apache.lucene.index.DocumentsWriter.createCompoundFile(DocumentsWriter.java:569) at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:2565) at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:2397) at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1204) at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1178) at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1153) Consequently, often documents are missing from the index. Does one have to perform any synchronized across IndexWriter and IndexReader? I assumed that Lucene took care of this. I sincerely appreciate any guidance on offer!' Many thanks Jamie PS: Here is the Lucene indexing debug information. IFD [http-8090-2]: setInfoStream deletionPolicy=org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy@1ae3b4d IW 27 [http-8090-2]: setInfoStream: dir=org.apache.lucene.store.FSDirectory@C:\index9121 autoCommit=false mergePolicy=org.apache.lucene.index.LogByteSizeMergePolicy@1b7682d mergeScheduler=org.apache.lucene.index.ConcurrentMergeScheduler@1873a6 ramBufferSizeMB=16.0 maxBuffereDocs=-1 maxBuffereDeleteTerms=-1 maxFieldLength=50000 index=_3:c113 _4:c70 _5:c44 _6:c68 IW 27 [Timer-0]: now flush at close IW 27 [Timer-0]: flush: segment=_7 docStoreSegment=_7 docStoreOffset=0 flushDocs=true flushDeletes=false flushDocStores=true numDocs=27 numBufDelTerms=0 IW 27 [Timer-0]: index before flush _3:c113 _4:c70 _5:c44 _6:c68 flush postings as segment _7 numDocs=27 closeDocStore: 2 files to flush to segment _7 numDocs=27 oldRAMSize=212992 newFlushedSize=32784 docs/MB=863.578 new/old=15.392% IFD [Timer-0]: now checkpoint "segments_5" [5 segments ; isCommit = false] IFD [Timer-0]: delete pending file _9s.cfs IFD [Timer-0]: delete "_9s.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9s.cfs": java.io.IOException: Cannot delete C:\index9121\_9s.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9y.cfs IFD [Timer-0]: delete "_9y.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9y.cfs": java.io.IOException: Cannot delete C:\index9121\_9y.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfs IFD [Timer-0]: delete "_9x.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfs": java.io.IOException: Cannot delete C:\index9121\_9x.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9v.cfs IFD [Timer-0]: delete "_9v.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9v.cfs": java.io.IOException: Cannot delete C:\index9121\_9v.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9z.cfs IFD [Timer-0]: delete "_9z.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9z.cfs": java.io.IOException: Cannot delete C:\index9121\_9z.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfs IFD [Timer-0]: delete "_9t.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfs": java.io.IOException: Cannot delete C:\index9121\_9t.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfx IFD [Timer-0]: delete "_9x.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfx": java.io.IOException: Cannot delete C:\index9121\_9x.cfx; Will re-try later. IFD [Timer-0]: delete pending file _9u.cfs IFD [Timer-0]: delete "_9u.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9u.cfs": java.io.IOException: Cannot delete C:\index9121\_9u.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9w.cfs IFD [Timer-0]: delete "_9w.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9w.cfs": java.io.IOException: Cannot delete C:\index9121\_9w.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfx IFD [Timer-0]: delete "_9t.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfx": java.io.IOException: Cannot delete C:\index9121\_9t.cfx; Will re-try later. IFD [Timer-0]: now checkpoint "segments_5" [5 segments ; isCommit = false] IFD [Timer-0]: delete pending file _9s.cfs IFD [Timer-0]: delete "_9s.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9s.cfs": java.io.IOException: Cannot delete C:\index9121\_9s.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9y.cfs IFD [Timer-0]: delete "_9y.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9y.cfs": java.io.IOException: Cannot delete C:\index9121\_9y.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfs IFD [Timer-0]: delete "_9x.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfs": java.io.IOException: Cannot delete C:\index9121\_9x.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9v.cfs IFD [Timer-0]: delete "_9v.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9v.cfs": java.io.IOException: Cannot delete C:\index9121\_9v.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9z.cfs IFD [Timer-0]: delete "_9z.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9z.cfs": java.io.IOException: Cannot delete C:\index9121\_9z.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfs IFD [Timer-0]: delete "_9t.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfs": java.io.IOException: Cannot delete C:\index9121\_9t.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfx IFD [Timer-0]: delete "_9x.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfx": java.io.IOException: Cannot delete C:\index9121\_9x.cfx; Will re-try later. IFD [Timer-0]: delete pending file _9u.cfs IFD [Timer-0]: delete "_9u.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9u.cfs": java.io.IOException: Cannot delete C:\index9121\_9u.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9w.cfs IFD [Timer-0]: delete "_9w.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9w.cfs": java.io.IOException: Cannot delete C:\index9121\_9w.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfx IFD [Timer-0]: delete "_9t.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfx": java.io.IOException: Cannot delete C:\index9121\_9t.cfx; Will re-try later. IFD [Timer-0]: delete "_7.fnm" IFD [Timer-0]: delete "_7.frq" IFD [Timer-0]: delete "_7.prx" IFD [Timer-0]: delete "_7.tis" IFD [Timer-0]: delete "_7.tii" IFD [Timer-0]: delete "_7.nrm" IFD [Timer-0]: delete "_7.fdx" IFD [Timer-0]: delete "_7.fdt" IW 27 [Timer-0]: LMP: findMerges: 5 segments IW 27 [Timer-0]: LMP: level -1.0 to 5.250432: 5 segments IW 27 [Timer-0]: CMS: now merge IW 27 [Timer-0]: CMS: index: _3:c113 _4:c70 _5:c44 _6:c68 _7:c27 IW 27 [Timer-0]: CMS: no more merges pending; now return IW 27 [Timer-0]: close: wrote segments file "segments_6" IFD [Timer-0]: now checkpoint "segments_6" [5 segments ; isCommit = true] IFD [Timer-0]: delete pending file _9s.cfs IFD [Timer-0]: delete "_9s.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9s.cfs": java.io.IOException: Cannot delete C:\index9121\_9s.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9y.cfs IFD [Timer-0]: delete "_9y.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9y.cfs": java.io.IOException: Cannot delete C:\index9121\_9y.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfs IFD [Timer-0]: delete "_9x.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfs": java.io.IOException: Cannot delete C:\index9121\_9x.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9v.cfs IFD [Timer-0]: delete "_9v.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9v.cfs": java.io.IOException: Cannot delete C:\index9121\_9v.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9z.cfs IFD [Timer-0]: delete "_9z.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9z.cfs": java.io.IOException: Cannot delete C:\index9121\_9z.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfs IFD [Timer-0]: delete "_9t.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfs": java.io.IOException: Cannot delete C:\index9121\_9t.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfx IFD [Timer-0]: delete "_9x.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfx": java.io.IOException: Cannot delete C:\index9121\_9x.cfx; Will re-try later. IFD [Timer-0]: delete pending file _9u.cfs IFD [Timer-0]: delete "_9u.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9u.cfs": java.io.IOException: Cannot delete C:\index9121\_9u.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9w.cfs IFD [Timer-0]: delete "_9w.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9w.cfs": java.io.IOException: Cannot delete C:\index9121\_9w.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfx IFD [Timer-0]: delete "_9t.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfx": java.io.IOException: Cannot delete C:\index9121\_9t.cfx; Will re-try later. IFD [Timer-0]: deleteCommits: now remove commit "segments_5" IFD [Timer-0]: delete "segments_5" IW 27 [Timer-0]: at close: _3:c113 _4:c70 _5:c44 _6:c68 _7:c27 IFD [Timer-0]: delete pending file _9s.cfs IFD [Timer-0]: delete "_9s.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9s.cfs": java.io.IOException: Cannot delete C:\index9121\_9s.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9y.cfs IFD [Timer-0]: delete "_9y.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9y.cfs": java.io.IOException: Cannot delete C:\index9121\_9y.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfs IFD [Timer-0]: delete "_9x.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfs": java.io.IOException: Cannot delete C:\index9121\_9x.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9v.cfs IFD [Timer-0]: delete "_9v.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9v.cfs": java.io.IOException: Cannot delete C:\index9121\_9v.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9z.cfs IFD [Timer-0]: delete "_9z.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9z.cfs": java.io.IOException: Cannot delete C:\index9121\_9z.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfs IFD [Timer-0]: delete "_9t.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfs": java.io.IOException: Cannot delete C:\index9121\_9t.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9x.cfx IFD [Timer-0]: delete "_9x.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9x.cfx": java.io.IOException: Cannot delete C:\index9121\_9x.cfx; Will re-try later. IFD [Timer-0]: delete pending file _9u.cfs IFD [Timer-0]: delete "_9u.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9u.cfs": java.io.IOException: Cannot delete C:\index9121\_9u.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9w.cfs IFD [Timer-0]: delete "_9w.cfs" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9w.cfs": java.io.IOException: Cannot delete C:\index9121\_9w.cfs; Will re-try later. IFD [Timer-0]: delete pending file _9t.cfx IFD [Timer-0]: delete "_9t.cfx" IFD [Timer-0]: IndexFileDeleter: unable to remove file "_9t.cfx": java.io.IOException: Cannot delete C:\index9121\_9t.cfx; Will re-try later. OK indeed from your code you are manually removing files from the index (the "deleteIndex" method). You shouldn't do that. I think what's happening is deleteIndex is called when an IndexReader has the index open (do you see those "failed to delete file in existing index" log messages?), then you open a writer on that directory. That would exactly explain your exception. The fix is simple: never remove files from the index yourself. Let IndexWriter do it, by opening with create=true. It will take care of removing the old files, retrying over time, etc. And, most importantly, this allows you to create a new index in a directory even while an IndexReader is still using it. The reader will be fine, and then when it reopens it will switch to the new index. Lucene 2.3 can read 2.2 indices but not vice versa, so you can't downgrade unless you completely remove your index. Mike Jamie <jamie@stimulussoft.com> wrote:
发表评论
-
lucene/solr FSDirectory NIOFSDirectory 性能测试对比与Http11NioProtocol
2012-03-25 19:28 1407原文出处:http://blog.chenlb.com/200 ... -
lucene对要解析的内容方面的限制及注意事项
2010-10-13 22:43 1093对内容长短的限制: 主要目的是防止内部不足而产生的内存 ... -
拨乱反正:“通过RAMDirectory缓写提高性能”是错误的!
2009-09-08 17:38 1662错误有二: 其一:程序错误,ramwriter的关闭时机有问 ... -
lucene打开文件的数量
2009-09-06 19:01 1290lucene在执行索引和检索时能同时打开多个文件,打开多个与共 ...
相关推荐
Exception in thread "main" java.lang.AbstractMethodError: org.apache.lucene.analysis.TokenStream.incrementToken()Z 换用svn里源码版正常 http://paoding.googlecode.com/svn/trunk/paoding-analysis/
java.lang.NoSuchFieldError: Companion 问题的解决方案
标签:apache、lucene、core、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明精准翻译,请放心...
- **概述**:Hibernate Search是Hibernate ORM的一个模块,允许开发者在Java应用中执行全文本搜索,支持Lucene搜索引擎。 - **集成**:它无缝集成到现有的Hibernate实体模型,使得数据库中的数据可以被索引和搜索...
Exception in thread "main" java.lang.AbstractMethodError: org.apache.lucene.analysis.TokenStream.incrementToken()Z at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField....
指南-Lucene:ES篇.md
由于林良益先生在2012之后未对IKAnalyzer进行更新,后续lucene分词接口发生变化,导致不可使用,所以此jar包支持lucene6.0以上版本
解决 java.lang.NoSuchFieldError: STRING at org.jbpm.identity.hibernate.PermissionUserType. 不用jbpm的jbpm-identity.jar 用这个就好
4. `org.apache.lucene.search.Query` 和 `org.apache.lucene.queryparser.classic.QueryParser`:理解查询的构建和解析过程。 5. `org.apache.lucene.search.Searcher`:研究搜索过程,特别是如何计算相关性和返回...
《深入理解Lucene分析器库:lucene-analysis.jar解析》 在信息检索和搜索引擎领域,Apache Lucene是一个广泛使用的开源全文检索库。它的核心功能包括文档的索引、搜索以及相关的高级特性。其中,"lucene-analysis....
Apache Lucene是一个高性能、全文本搜索库,广泛用于构建搜索引擎应用程序。这个名为"apache-lucene-analyzers.jar"的文件是Lucene项目的一部分,主要包含了各种分析器(analyzers)的实现,它们在处理文本数据时起...
[开发自己的搜索引擎:Lucene.Heritrix(第2版)].邱哲.扫描版.pdf
Lucene是一个基于Java的全文索引工具包。 1. 基于Java的全文索引引擎Lucene简介:关于作者和Lucene的历史 2. 全文检索的实现:Luene全文索引和数据库索引的比较 3. 中文切分词机制简介:基于词库和自动切分词算法的...
Linux Lucene 8.10.0是Apache Lucene项目的一个关键版本,它是一个高性能、全功能的文本搜索库,广泛应用于Java开发中。Lucene提供了丰富的搜索功能,包括全文检索、高级分析器、索引优化等,为开发者构建复杂的搜索...
lucene 解析,修改和字符串化Lucene查询。 | | 安装 npm install --save lucene -or- yarn add lucene 用法 const lucene = require ( 'lucene' ) ; const ast = lucene . parse ( 'name:frank OR job:engineer' )...
在C#开发中,搜索引擎的构建是不可或缺的一部分,而Lucene.Net作为一个强大的全文搜索引擎库,为开发者提供了丰富的功能。本文将重点探讨Lucene.Net.Analysis.Cn.dll和Lucene.Net.dll这两个关键组件在C#环境下的作用...
标签:apache、lucene、spatial、jar包、java、API文档、中英对照版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明...
import java.io.IOException; import java.nio.file.Paths; public class SearchingExample { public static void main(String[] args) throws Exception { Directory directory = FSDirectory.open(Paths.get(...
《深入理解Lucene 4.4.0代码库与Java核心技术》 在IT领域,Lucene是一个非常重要的开源全文搜索引擎库,它为开发者提供了强大的文本分析、索引和搜索功能。这里我们关注的是Lucene的4.4.0版本,通过解压"lucene-...
import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.StringField; import ...