lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uwe Schindler <>
Subject Re: Lucene 3.6.2 deleteDocument(docNum) and undeleteAll
Date Thu, 23 May 2013 20:01:06 GMT
Use delete by query in IndexWriter. No need to use IndexSearcher. schrieb:
>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?

Uwe Schindler
H.-H.-Meier-Allee 63, 28213 Bremen
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message