It depends on whether or not the commit completes before the reopen. Lucene 2.9 adds an IndexWriter.getReader method that will always return with the latest modifications to your index.
So if you're adding many documents, you can at anytime, call IW.getReader and you will be able to search the changes made to that point. This is not different than reopen except getReader does not require a commit. On Fri, Sep 25, 2009 at 10:41 AM, Klaus Teller <[email protected]> wrote: > Hi, > > I've read that it is possible to update the index while another thread has a > reader open. > > Now let's say the reader is trying to reopen the index (using its reopen > method) and at the very same time, the write its committing its 500MB changes > to the index. My question is, what happens in this situation? What index does > the reader end up having if it tries to open the index while the writer is > modifying it? > > Any feedback will be much appreciated, > > Klaus. > -- > Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 - > sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
