On Jan 15, 2008 7:15 PM, Alexei Dets <[EMAIL PROTECTED]> wrote:
> Hi!
> I'm curious, is there any particular reason why Lucene offers
> IndexReader.deleteDocument(int docNum) but not
> IndexWriter.deleteDocument(int docNum)?

Document ids are transient and can change.
To figure out which ids you want to delete, you normally need to
search (requiring a reader).
There has been movement toward adding equivalent functionality to
IndexWriter, and it probably requires exposing IndexReaders at some
point to allow users to do the search to produce the ids to delete.
So in short, it's not at all simple to have an
IndexWriter.deleteDocument() that makes sense.

-Yonik

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

Reply via email to