lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: When to refresh writer?
Date Mon, 13 Feb 2012 18:22:32 GMT
IndexWriter doesn't require refreshing... just keep it open forever.
It'll run it's own merges when needed (see the MergePolicy/Scheduler).

Just call .commit() when you want changes to be durable (survive
OS/JVM crash, power loss, etc.).

Mike McCandless

http://blog.mikemccandless.com

On Mon, Feb 13, 2012 at 1:17 PM, Cheng <zhoucheng2008@gmail.com> wrote:
> Hi,
>
> My application will go on for ever. When is good time to refresh the writer
> (and merge the segments)?
>
> Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message