lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: 2.4 questions
Date Mon, 15 Sep 2008 19:30:34 GMT

Cam Bazz wrote:

> However the documentation states that autoCommit=true.

For now, keep using the deprecated API and specify autoCommit=false.   
Then in 3.0, when IndexWriter switches to autoCommit=false, remove the  
boolean autoCommit from your constructor.

> How do we disable this? In 2.3 I used to do a:
> writer.setMaxBufferedDocs(IndexWriter.DISABLE_AUTO_FLUSH);
> would that totally disable autoCommit, or will it autoCommit when the
> ram usage reaches a certain criteria.

Actually, this (maxBufferedDocs, as well as ramBufferSizeMB) controls  
when buffered docs in RAM are written as a new segment to disk.  When  
such a segment is created, it's not yet referenced by a segments_N  
file (thus a newly opened IndexReader won't see them) until a commit  
(or flush) happens.

autoCommit=true, instead, means IndexWriter will periodically (on it's  
own schedule) call commit() internally.


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

View raw message