I don't think so. It's still a single segment. Close the reader, and you still have only one segment. You only have gaps from deleted docs, but I think that doesn't make the index unoptimized, even though optimizing such an index will remove the gaps. Otis
----- Original Message ---- From: Dave Kor <[EMAIL PROTECTED]> To: java-user@lucene.apache.org; Otis Gospodnetic <[EMAIL PROTECTED]> Sent: Thu 12 Jan 2006 03:26:46 AM EST Subject: Re: How to check, whether Index is optimized or not? Do we need to check if any documents are marked for deletion? On 1/12/06, Otis Gospodnetic <[EMAIL PROTECTED]> wrote: > I don't think we have a public API for that, but the index is considered > optimized when it contains only a single segment. > Then, we could add the following to IndexReader: > > public boolean isOptimized() { > return segmentInfos.size() == 1; > } > > I think that should do it. > > Otis > > > ----- Original Message ---- > From: Maxim Patramanskij <[EMAIL PROTECTED]> > To: lucene-user@jakarta.apache.org > Sent: Wed 11 Jan 2006 08:26:27 AM EST > Subject: How to check, whether Index is optimized or not? > > Hello dear Lucene users! > > Is their an easy way to check, whether index is optimized or not? > > > Best regards, > Max > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Research Assistant Center for Information Mining and Extraction School of Computing National University of Singapore. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]