lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: IndexReader#reopen() on externally changed index
Date Mon, 17 Oct 2011 10:47:35 GMT
You'll have to call .commit() from the IndexWriter to make the changes
externally visible.

The call IndexReader.reopen to get a reader seeing the committed
changes; the reopen will be efficient (only open "new" segments vs the
old reader).

It's still best to use near-real-time reader when possible (ie, open
the IndexReader from the IndexWriter), but it sounds like in your case
this is not possible since writer and reader on different
JVMs/machines across a network.

Mike McCandless

On Sun, Oct 16, 2011 at 10:32 PM, Denis Bazhenov <> wrote:
> We have situation when lucene index is replicated over network. And on that machine reader
reopen doesn't make new documents visible to a search.
> As far as I know IndexReader.reopen() call does work only if changes are applied using
the linked IndexWriter. My question is: how can I implement efficient index reopen (only new
segments should be read) when index is changed externally?
> ---
> Denis Bazhenov <>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message