lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anna Hunecke <annahune...@yahoo.de>
Subject IOExceptions when optimising the index
Date Thu, 29 Apr 2010 10:50:29 GMT
Hi!

we are using Lucene 2.4.1 in our app. It works great so far, but now a customer ran into a
strange problem.
During the day, the search index is updated regularly with the newest changes in the application.
At night, when nothing much is happening in the application, the index is optimised.
The updating during the day works fine, but during the optimizing, all kinds of strange exceptions
occur:

java.io.IOException: Access is denied
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
at org.apache.lucene.store.SimpleFSLock.obtain(SimpleFSLockFactory.java:144)
at org.apache.lucene.store.Lock.obtain(Lock.java:73)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1070)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:566)

or 

org.apache.lucene.store.LockReleaseFailedException: failed to delete searchindex\write.lock
at org.apache.lucene.store.SimpleFSLock.release(SimpleFSLockFactory.java:149)
at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1668)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1602)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1578)

or 

java.io.IOException: background merge hit exception: _dhi:c1195 _dlt:c33 into _dlu [optimize]
Exception in thread "Lucene Merge Thread #0" 	at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2273)
at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2218)
at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:2198)
...
Caused by: java.io.FileNotFoundException: searchindex\_dlu.fnm (The system cannot find the
file specified)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(Unknown Source)
at org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.<init>(FSDirectory.java:552)
at org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java:582)
at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:488)
at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:482)
at org.apache.lucene.index.CompoundFileWriter.copyFile(CompoundFileWriter.java:221)
at org.apache.lucene.index.CompoundFileWriter.close(CompoundFileWriter.java:184)
at org.apache.lucene.index.SegmentMerger.createCompoundFile(SegmentMerger.java:204)
at org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4263)
at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3884)
at org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:205)
at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:260)

The indexes look fine when I open them with Luke, and since the normal updating works, I don't
think it has something to do with write-rights of the disks. 
So, what could be the cause of this?
And: How necessary is it really to run an optimisation every night? A lot of changes take
place when the program runs, so the search index is changed quite frequently. Maybe it is
enough to let the automatic merging take care of things?

Greets,
Anna



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message