I noticed that the API for Lucene 2.1+ includes a deleteDocuments(Term)
method in the IndexWriter.  I'd love to be able to change my application to
use it (we're constantly updating docs, which means opening/closing the
writer/reader each time we update a doc). I use complex queries to determine
which docs to delete.  Pre-2.1, I've just executed a search and then looped
through hits.id() as the parameter to the IndexReader.deleteDocument().  I'm
trying to figure out how to do the same for Lucene 2.1.  Is there a way to
specify the internal docid as a term? (So I can call
IndexWriter.deleteDocuments(internalId)?  Otherwise, I was thinking of using
a hit collector to fetch just our external UID.

Thanks for any guidance.

L

Reply via email to