Is it possible to delete by docId in lucene 4?  I can delete by docid
in lucene 3 using IndexReader.deleteDocument(int docId), but that
method is gone in lucene 4, and IndexWriter only allows deleting by
Term or Query.

This is our use case -  In our system, each document is identified by
a unique serial id.  If an error occurs, we may index the same message
multiple times.  When an index grows large enough, we stop adding to
it, and optimize the index.  During optimization, if we see multiple
docs with the same serialid, we delete all but the first, as all
documents with the same serialid are the same.

Thanks,

Sean

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

Reply via email to