lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: IndexReader.reopen() If Index Has Been Rebuilt
Date Thu, 14 Feb 2013 14:11:25 GMT
I've never tried reopen() on a completely new index, but if it works,
it works.  Try it. I'm not aware of any documentation explicitly
mentioning this.

The benefit of using reopen() rather than close/open is that if only
some segments have changed the reopen is less costly.  For a brand new
index everything will have changed so I guess you won't save anything
over a standard close/open.


--
Ian.


On Wed, Feb 13, 2013 at 6:28 PM, Wendy Meadows <wsm879@gmail.com> wrote:
> We're using Lucene 3.3.0 and have an index with close to 10 million
> documents.  When the application is started and the first search is
> performed, we open a read only IndexReader by calling
> IndexReader.open(directoryString, true).  For all following searches, we
> check if the indexReader is current and if not, call IndexReader.reopen().
>  What happens if we rebuild the index from scratch while using the same
> IndexReader and only refreshing it by calling reopen?  I can't seem to find
> any solid documentation explaining this, but have read a few things that
> are giving me the impression that this may not be the best approach.  Can
> someone at least point me to some documentation regarding this?
>
> Thank you!

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