lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
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.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message