lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: Update performance/indexwriter.delete()?
Date Thu, 14 Apr 2005 16:26:53 GMT
> An IndexReader is required to, given a term, find the document number to
> mark deleted.

Yeah, most the time it makes sense to do deletions off the
IndexReader.  There are times, however, when it would be nice for
deletes to be able to be concurrent with adds.

Q: can docids change after an add() (with merging segments going on
behind the scenes) or is optimize() the only call that ends up
changing the docid->Document mapping?

If it's only optimize() then it seems like delete(int docnum) could
easily be added to IndexWriter.  It would be up to the user, of
course, to ensure that the IndexReader used to obtain the docids to
delete was in sync (meaning the docids match up) with the IndexWriter.
 The big benefit would be that one could add and delete documents at
the same time - something that can't be done today, AFAIK.


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

View raw message