lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: about lucene in action 2
Date Sun, 14 Mar 2010 10:13:49 GMT
Flushing means stuff (added docs, deletions) buffered in RAM are moved
to disk, ie, written as new segment files.

But the new segments_N file, referencing these new segments, is not written.

Nor are the files "sync"'d.

This means a newly opened or reopened reader will not see the changes.

In order to make the changes "visible" you have to call IndexWriter.commit.


On Sun, Mar 14, 2010 at 2:36 AM, luocanrao <> wrote:
> I am reading lucene in action 2,there is some question about it.
> When a flush occurs, the writer creates new segment and deletion files in
> the Directory. However,
> these files are neither visible nor usable to a newly opened IndexReader
> until the writer commits the
> changes. It's important to understand this difference. Flushing is done to
> free up memory consumed by
> buffered changes to the index, whereas committing is done to make all
> flushed changes persistent and
> visible in the index.
> Why Flushing does not make all flushed changes persistent even if it had
> created new segment?
> Flushing does not mean flush any change to disk?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message