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 <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to