lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <>
Subject RE: IndexWriter shutdown
Date Wed, 23 May 2007 12:03:01 GMT
"Steven Parkes" <> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message