lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Open an IndexWriter in parallel with an IndexReader on the same index.
Date Wed, 22 Feb 2006 01:24:58 GMT

: It would have been nice if someone wrote something like indexModifier,
: but with a cache, similar to what Yonik suggested above: deletions will
: not be done immediately, but rather cached and later done in batches.
: Of course, batched deletions should not remember the term to delete,
: but rather the matching document numbers at the time of the deletion -
: because after the addition of the modified document if we search for
: the term again we'll find two documents.

That's not a safe sequence of events.  An Add can trigger a segment merge,
which cna renumber documents.

As yonik said, you want to queue up the adds/updates, then do a delete for
each update in your queue, then do your adds in one batch.  knowing
when/what to delete requies knowing a "key" for your records -- which
isnt' a native lucne concept, but it is certainly a general enough one
that a helper class could be written for this.


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

View raw message