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 with
> a reindexing in the period between opening an IndexSearcher and using it to
> 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 this
> 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.

HTH
        Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to