Hi all, 

I was trying to determine if the documentation for optimize() is true:

http://lucene.apache.org/java/2_4_0/api/core/org/apache/lucene/index/IndexWriter.html#optimize()

Testing was done using Lucene 2.4

I basically have 2 lucene index, 
Index A) one with no Searcher open during optimize() and 
Index B) another with a searcher open during optimize().

Also, I have daemon threads setup to monitor the size of the entire index. At 
the end of the execution, the daemon thread will display the max HD usage and 
the current HD usage (after optimize() )

Now, I found out that upon completion, 
Index A has the optimized size,
Index B has x2 of the optimized size.
which is as what is in the documentation.

However, 
Index A max HD usage during optimize() was the same as max HD usage of Index B. 
That is, triple the original size of the index (at one point during close() 
after optimize() was called) .

According to the documentation, Index A should just use twice HD max.

This is important for me because I want to be able to anticipate the HD 
requirement for a really big Lucene Index.
Is it always the case that the HD requirement for Lucene Index across all 
versions is x3 of the expected max Index size?


      

Reply via email to