lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: IndexWriter.commit() performance
Date Wed, 05 Jun 2013 11:44:38 GMT
On Tue, Jun 4, 2013 at 7:31 PM, Renata Vaccaro <> wrote:
> Thanks.  I need the documents to be searchable as soon as they are
> added.  I also need the documents added to survive a machine crash.
> Soft commits and NRT gets might work, but from what I've read they are
> only available for Solr?

Likely commits got slower on upgrade because on your very, very old
Lucene version fsync was not called, so there was no safety on
OS/hardware crash to ensure the index was intact.

Solr's soft commit uses Lucene's near-real-time APIs, so you can
definitely do this with just Lucene: pass the IndexWriter to, and then use DirectoryReader.openIfChanged to
reopen (without committing).

This lets you decouple durability to crashes (how often you commit)
from index-to-search latency (how often you reopen the reader).

Mike McCandless

View raw message