lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weir, Michael" <>
Subject RE: verifying index integrity
Date Wed, 07 Apr 2004 14:37:31 GMT
Thanks for the quick response.
So if our server is the only process that ever opens the index, I should be
able to run through the indexes at startup and simply unlock them?

Michael Weir . Transform Research Inc. . 613.238.1363 x.114

-----Original Message-----
From: Doug Cutting []
Sent: Tuesday, April 06, 2004 5:09 PM
To: Lucene Users List
Subject: Re: verifying index integrity

Weir, Michael wrote:
> I assume that it is possible to corrupt an index by crashing at just the
> time.

It should not be possible to corrupt an index this way.

> I notice that there's a method IndexReader.unlock().  Does this method
> ensure that the index has not been corrupted?

If you use this method, it is possible to corrupt things.  In 
particular, if you unlock an index that another process is modifying, 
then modify it, then these two processes might step on one another.  So 
this method should only be called when you are certain that no one else 
is modifying the index.

There is no index integrity checker.  I suppose one could implement one 
by implementing a NullDirectory that ignores all reads and writes, then 
use IndexWriter.addIndexes() to add the index to be checked to a 
NullDirectory.  That would parse all of the files in the index.


To unsubscribe, e-mail:
For additional commands, e-mail:

	Cognos Forum, June 27-30, 2004: Power Your Performance. Join us in
Orlando for our global customer conference. Engage with your peers. Hear
from top analysts. Learn from the Cognos Business Intelligence and
Enterprise Planning gurus. And turn your potential into higher performance.
Register today at 

	This message may contain privileged and/or confidential information.
If you have received this e-mail in error or are not the intended recipient,
you may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message