> 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. -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]