lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
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();
   writer.deleteDocuments(term);
   int deleted = beforeCount - writer.docCount();

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

Antony


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message