Unfortunately this is expected behavior. We tried to fix it in LUCENE-2812, but this fix was too dangerous and could sometimes erase a good index (if transient IOExcs are happening, e.g. due to file descriptor exhaustion) so we reverted back in LUCENE-4738, so that indexExists will return true, and trying to open an IndexReader will throw CorruptIndexException, when the first-commit has started but not yet finished.
Mike McCandless http://blog.mikemccandless.com On Thu, May 16, 2013 at 10:45 AM, Geoff Cooney <cooney.ge...@gmail.com> wrote: > Hi, > > We're occasionally seeing a CorruptIndexException when a searcher is opened > on a new index. > > When we see the exception, it looks like what is happening is that the > searcher is opening the index after prepareCommit for segments_1 but before > the commit is completed. Because there is no prior commit to fall back to, > lucene throws the CorruptIndexException. Does this sounds feasible and is > it a bug? My expectation is that lucene would treat the index as > nonexistent until the first commit is completed. > > We're running lucene 3.5. > > Cheers, > Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org