"Cedric Ho" <[EMAIL PROTECTED]> 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(IndexFileDeleter.java:88)
> at
> org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1570)
> at
> org.apache.lucene.index.IndexWriter.flushRamSegments(IndexWriter.java:1351)
> at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:891)
> ......
>
> 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:
http://issues.apache.org/jira/browse/LUCENE-825
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.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]