lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: IOExceptions when optimising the index
Date Thu, 29 Apr 2010 11:32:56 GMT
Hi


It is not necessary to run optimize.  At a guess there is some job
such as a backup or virus check that is running overnight and locking
files and parts of the file system.  If that is the case, and you do
want to run optimize, perhaps you could schedule around it.  Or switch
to a unix based system that doesn't have these locking issues.


--
Ian.


On Thu, Apr 29, 2010 at 11:50 AM, Anna Hunecke <annahunecke@yahoo.de> wrote:
> 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
>
>

---------------------------------------------------------------------
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