lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: IndexReader.openIfChanged Doesn't Work on MultiReader
Date Fri, 02 Dec 2011 23:33:20 GMT

> I have a MultiReader made up of 3 different indexes.  If changes are made
> either of the 3 underlying indexes, isCurrent() returns false (correctly)
on said
> MultiReader.  However, if I use the method IndexReader.openIfChanged() on
> the MultiReader, a new MultiReader is returned (it does NOT return null),
> its isCurrent() method is still reporting false.  Also, a search using
this new
> MultiReader doesn't not see the index changes (deletes and additions).  I
> to explicitly close the MultiReader and open it again to see changes, but
> documentation states this is an inefficient way of refreshing readers.

It is not inefficient as MultiReader is just a light wrapper around a
collection of readers. If you simply openIfChanged (!) each subreader
yourself and wrap them by a new MultiReader it will not slowdown anything.
MultiReader.doOpenIfChanged does nothing else, but maybe with a bug
introduced by the refactoring.

> I assumed someone must have run into this before?

Can you open an issue at ?


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

View raw message