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. Mike On Sun, Mar 14, 2010 at 2:36 AM, luocanrao <luocan19826...@sohu.com> 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: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org