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]

Reply via email to