On Wed, Jan 13, 2010 at 7:33 AM, John Wang <john.w...@gmail.com> wrote:
> "NRT reader "simply" lets you search the full index, including
> un-committed changes."
>
> I am not sure I understand:
>
> I think the context of the discussion is for when the indexer crashes before
> IW.commit. At which point, does not really matter if you are using NRT, e.g.
> IW.getReader, or IndexReader.open, the uncommitted changes are NOT
> searchable.

Right, that's what I meant by "orthogonal".

It used to be (before NRT) if you wanted to search newly added/deleted
docs, you had to first commit, then reopen your reader, which was
costly.

Whereas now, with NRT, you're no longer forced to commit, in order for
a reader to see changes to the index.

This makes the decision of "how often to commit" (safety) completely
independent from "how often to reopen the reader" (freshness).

How often to commit is entirely a safety vs performance tradeoff, to
be made by the app.  Commit often and you lose (have to replay) very
little on crash, but, have worse indexing throughput.

How often to reopen is a freshness vs performance tradeoff.

The two (safety & freshness) are now fully decoupled, but were not in
past releases.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to