Hi Mike,
By optimizing (in this particular case) I seek to minimize the disk
space used by the index files.
My index is incremental - docs get added and deleted on the fly.
There is also a user defined constraint of total index size (in terms of
disk space).
There is another user defined constraint of max segments size which is
approximated by IndexWriter.MAX_MERGE_DOCS
When this max index size is reached, I would like to first try optimize
the index
which (if I am not mistaken) will remove from each segment the documents
marked as deleted thus saving some space.
Correct or am I missing something?
Regards,
Stanislav
Mike Klaas wrote:
On 10/27/06, Stanislav Jordanov <[EMAIL PROTECTED]> wrote:
Have the following problem with (explicitly invoked) index
optimization -
it seems to always merge all existing index segments into a single huge
segment, which is undesirable in my case.
Is there a way to force index optimization to honor the
IndexWriter.MAX_MERGE_DOCS setting?
It is unclear to me what you hope to accomplish by optimizing in this
case. If you set MAX_MERGE_DOCS, lucene will produce a series of
segments of (approximately) that size, plus a bounded (log n) number
of additional segments, the sum of the size of which is <
MAX_MERGE_DOCS. So at best you'd achieve one more segment merged. I
doubt optimizing would buy you much, especially as num docs >>
MAX_MERGE_DOCS
-Mike
---------------------------------------------------------------------
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]