Christiaan Fluit wrote:
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 ;)

The IndexReader opened in 1 keeps a copy of his version of the index until he is closed. This means he will never see any changes made by another reader or a writer.


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



Reply via email to