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: Realtime search best practices
Date Mon, 12 Oct 2009 19:26:10 GMT
On Mon, Oct 12, 2009 at 3:17 PM, Jake Mannix <jake.mannix@gmail.com> wrote:

> Wait, so according to the javadocs, the IndexReader which you got from
> the IndexWriter forwards calls to reopen() back to IndexWriter.getReader(),
> which means that if the user has a NRT reader, and the user keeps calling
> reopen() on it, they're getting uncommitted changes as well, while if they
> call reopen() on a regular IndexReader, they do not?

That's right.

> How does this play nicely with the transactional semantics given by
> commit()?

The transactional semantics are still intact... it's just that an NRT
reader sees the uncommitted changes, ie, all changes done since the
last commit.

If disaster strikes (machine/os/jvm crashes, power loss, kill -9,
etc.) then on reboot/restart your index will still only show the last
successfull commit.

Mike

---------------------------------------------------------------------
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