lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <>
Subject Re: exception during optimze
Date Fri, 01 Jun 2007 09:29:29 GMT

"Cedric Ho" <> wrote:

> When I tried to build an index last night, the following exception
> occurred during call to IndexWriter.optimze():
> java.lang.NullPointerException
>         at org.apache.lucene.index.IndexFileDeleter.findDeletableFiles(
>         at org.apache.lucene.index.IndexWriter.mergeSegments(
>         at org.apache.lucene.index.IndexWriter.flushRamSegments(
>         at org.apache.lucene.index.IndexWriter.optimize(
>         ......
> The mergeFactor is set to 500. And the final index file size is about
> 10Gb.
> Also since the writer.close() is not called. There's an write.lock
> file in the index directory. After deleting the write.lock file, I
> called optimze() again and it complete successfully. Is the indexing
> successful then? Will any documents be lost due to the above
> exception?

Hmmm, this means Directory.list() returned null.  We improved the
error handling on receiving a null from directory.lost(), but after
2.1 was released, see here:

But that fix just ensures you get a proper IOException when null is
returned; we still need to explain the "root cause" of why you're
getting a null return in the first place.


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

View raw message