lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christiaan Fluit <>
Subject Re: Deleting a document with an IndexWriter open
Date Fri, 16 Jul 2004 13:01:19 GMT
Christoph Goller wrote:
> 1) Keep an IndexReader/Searcher open on your index in order to guarantee
> reed access and a consistent index during the whole process.
> 2) Open a new IndexReader and delete all the documents that you want to
> update.
> 3) Close the IndexReader (makes the deletions visible for any new
> readers/writers but not for the still opened Searcher/Reader).

But what happens when a query evaluated by the IndexReader/IndexSearcher 
mentioned in (1) results in a hit that has already been deleted by the 
second IndexReader? I.e. you try to access a document through one 
IndexReader that has already been deleted by another IndexReader.

I would expect some kind of exception because the document data can no 
longer be found, or am I missing something? I hope I am because your 
solution does sound very attractive ;)

Kind regards,


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

View raw message