Hello,
We have code running with Lucene 2.9.4 that does the following:

1.       Check that number of documents to be deleted, found with a particular 
query, matches the expected number we pass in

2.       For each ScoreDoc in the ScoreDoc[] returned from the search we call 
deleteDocument(scoreDocs[i].doc) each iteration checking that our program has 
not been asked to shut down.

3.       If there was an error we call undeleteAll() to rollback any deletes 
that have already been done

In Lucene 3.6.2 the IndexReader delete* methods are deprecated since the logic 
is being moved to the IndexWriter in 4.x, but there does not seem to be similar 
methods implemented on the IndexWriter side. What is the appropriate way that 
we should be doing these deletes and undeletes in order to provide the same 
level of functionality?

Reply via email to