lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject IndexWriter.deleteDocuments(Term) vs IndexReader.deleteDocuments(Term)
Date Thu, 15 Mar 2007 22:22:11 GMT
The writer method does not return the number of deleted documents.  Is there a 
technical reason why this is not done.

I am planning to see about converting my batch deletions using IndexReader to 
IndexWriter, but I'm currently using the return value to record stats.

Does the following give the same results?

   int beforeCount = writer.docCount();
   int deleted = beforeCount - writer.docCount();

Given that I add and delete in batches, is there any benefit to switching to 
IndexWriter for deletions?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message