lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Mellor <>
Subject RE: Concurrent searching & re-indexing
Date Thu, 17 Feb 2005 10:44:32 GMT
"on windows you cannot delete open files, so Lucene AFAIK (I don't use
windows) postpones the deletion to a time, when the file is closed"

If Lucene does not in fact postpone the deletion, that would explain the
exception I'm seeing (" couldn't delete _a.f1") - the
IndexWriter is attempting to delete the files but the IndexReader has them

Does this then mean that re-indexing whilst searching is inherently unsafe,
but only on Windows?

-----Original Message-----
From: Morus Walter []
Sent: 17 February 2005 10:38
To: Lucene Users List
Subject: RE: Concurrent searching & re-indexing

Paul Mellor writes:
> 1. If IndexReader takes a snapshot of the index state when opened and then
> reads the files when searching, what would happen if the files it takes a
> snapshot of are deleted before the search is performed (as would happen
> a reindexing in the period between opening an IndexSearcher and using it
> search)?
On unix, open files are still there, even if they are deleted (that is,
there is no link (filename) to the file anymore but the file's content
still exists), on windows you cannot delete open files, so Lucene 
AFAIK (I don't use windows) postpones the deletion to a time, when the 
file is closed.
> 2. Does a similar potential problem exist when optimising an index, if
> combines all the segments into a single file?
AFAIK optimising creates new files.

The only problem that might occur, is opening a reader during index change
but that's handled by a lock.


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

This e-mail has been scanned for viruses by MCI's Internet Managed Scanning
Services - powered by MessageLabs. For further information visit

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient, you should not copy, retransmit or
use the e-mail and/or files transmitted with it  and should not disclose
their contents. In such a case, please notify
and delete the message from your own system. Any opinions expressed in this
e-mail and/or files transmitted with it that do not relate to the official
business of this company are those solely of the author and should not be
interpreted as being endorsed by this company.

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