"Steven Parkes" <[EMAIL PROTECTED]> wrote:

> As to what happens in the middle of a merge or optimize: I think it
> might depend on the autoCommit flag. Since an optimize may be done
> in stages, whether the intermediary stages are kept or not is going
> to depend on when the segments file gets updated (and I haven't
> checked the current status of this.) I can see it either way:
> keeping partial work (to resume) or throwing everything away on a
> shutdown.

Actually if autoCommit=true then the only choice is to keep the
partial work.  In this mode, optimize indeed goes in "stages" (merging
mergeFactor segments at a time) and after each stage it commits a new
segments_N file and removes the now-merged segments.  Of course if
it's a smallish index (<= mergeFactor segments) then there is only 1
stage anyway.

If autoCommit=false, then I think the index should rollback to the
state when the IndexWriter was opened.  This is the point of
autoCommit=false: either all or none of the changes made during the
lifetime of the IndexWriter instance "make it" into the index.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to