lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulf Dittmer <uditt...@yahoo.com>
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
anyway.

Ulf

--- Michael McCandless <lucene@mikemccandless.com>
wrote:

> I believe your docs are being deleted.  It's just
that
> IndexWriter.docCount() does not count deleted docs. 
> That method matches IndexReader.maxDoc(), not
IndexReader.numDocs().
> 
> 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.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
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