lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Keegan <peterlkee...@gmail.com>
Subject Re: 2 phase commit with external data
Date Fri, 06 Nov 2009 16:35:27 GMT
Which version of the index will IndexWriter.getReader() return if there have
been updates, but no call to 'prepareCommit'?


On Fri, Nov 6, 2009 at 11:33 AM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> On Fri, Nov 6, 2009 at 11:22 AM, Peter Keegan <peterlkeegan@gmail.com>
> wrote:
> >>Can you use IndexWriter.getReader() to get the reader for step 2
> > Yes - perfect! I didn't think that would be different than refreshing or
> > recreating an IndexReader.
>
> Great!
>
> getReader() searches the full index, plus uncommitted changes.
>
> > I don't need to keep the old commit alive. The goal is to keep the
> external
> > file in synch with the index, so a separate searcher process will see
> > consistent data. By postponing both commits, the window where they are
> out
> > of synch is very small (2 file renames). I record the Lucene index
> version
> > in the external file for checking synchcronization.
>
> OK.
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message