lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renata Vaccaro <ren...@emailtopia.com>
Subject RE: IndexWriter.commit() performance
Date Thu, 06 Jun 2013 02:09:04 GMT
Thanks very much.  I'll look into that.

-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com] 
Sent: Wednesday, June 05, 2013 7:45 AM
To: general@lucene.apache.org
Subject: Re: IndexWriter.commit() performance

On Tue, Jun 4, 2013 at 7:31 PM, Renata Vaccaro <renata@emailtopia.com>
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
DirectoryReader.open, 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

http://blog.mikemccandless.com

Mime
View raw message