Interesting you mention numDeletedDocs w.r.t. optimize - I need that information for exactly the same reason. Is there any good rule of thumb of knowing when it's best to call optimize? I know that during the internal merges Lucene does, deleted docs are removed. However there are those large segments that get merged very infrequently. Do you have some sort of *magic formula* that combines the num-deleted-docs, num-docs, and maybe other parameters?
On Jan 11, 2008 9:43 PM, Otis Gospodnetic <[EMAIL PROTECTED]> wrote: > I think that's useful (for knowing when it's time to optimize), though I > thought I added something like that a long time ago... maybe on some local > version... > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > ----- Original Message ---- > From: Shai Erera <[EMAIL PROTECTED]> > To: java-dev@lucene.apache.org > Sent: Friday, January 11, 2008 2:30:24 PM > Subject: Add numDeletedDocs() to IndexReader > > Hi guys, > > I had a need to know how many deleted documents are in the index. I > noticed > there isn't an API for it in IndexReader, however the information can > be > obtained by calling IndexReader.maxDoc() - IndexReader.numDocs(). > Do you think it's worth adding such an API to IndexReader? > > Cheers, > > Shai > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Regards, Shai Erera