RE: IndexReader.reopen() If Index Has Been Rebuilt

2013-02-14 Thread Uwe Schindler
gt; Subject: Re: IndexReader.reopen() If Index Has Been Rebuilt > > 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 th

Re: IndexReader.reopen() If Index Has Been Rebuilt

2013-02-14 Thread Michael McCandless
This use case is fine: you can fully re-index into an index that's held open by an IndexReader. It's best to use IndexWriterConfig's OpenMode.CREATE to do this (instead of rm -rf /path/to/index): this way if something goes wrong with your indexing before it has a chance to commit (eg JVM or OS cra

Re: IndexReader.reopen() If Index Has Been Rebuilt

2013-02-14 Thread Ian Lea
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

IndexReader.reopen() If Index Has Been Rebuilt

2013-02-13 Thread Wendy Meadows
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