Hi Nadav,
This is exactly the approach Solr uses by default, and it works fine.
see doDeletions() on DirectUpdateHandler2
http://svn.apache.org/viewcvs.cgi/incubator/solr/trunk/src/java/org/apache/solr/update/DirectUpdateHandler2.java?rev=372455&view=markup
We keep a Map of id->num_to_save that
A few days ago someone on this list asked how to efficiently "update"
documents in the index, i.e.,
delete the old version of the document (found by some unique id field) and
add the new version.
The problem was that opening and closing the IndexReader and IndexWriter
after each document
was inef