lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulf Dittmer <>
Subject Re: differences in deleting docs using IndexWriter and IndexModifier?
Date Fri, 18 Apr 2008 15:42:26 GMT
Thanks for the explanation.

You're right, IndexReader reports the correct number
of documents.

That might be a worthwhile addition to the
IndexModifier javadocs -
that the IndexWriter method of the same name is not a
drop-in replacement.

Of course, that's moot if docCount gets deprecated


--- Michael McCandless <>

> I believe your docs are being deleted.  It's just
> IndexWriter.docCount() does not count deleted docs. 
> That method matches IndexReader.maxDoc(), not
> If you open an IndexReader and call numDocs() does
> it reflect the deletion?
> Really I think we should add "maxDoc()" and
"numDocs()" to IndexWriter,
> and deprecate docCount() in favor of maxDoc().  I'll
open an issue.

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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

View raw message