lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Created: (LUCENE-2045) FNFE hit when creating an empty index and infoStream is on
Date Sun, 08 Nov 2009 15:28:32 GMT
FNFE hit when creating an empty index and infoStream is on

                 Key: LUCENE-2045
             Project: Lucene - Java
          Issue Type: Bug
          Components: Index
            Reporter: Michael McCandless
            Assignee: Michael McCandless
            Priority: Minor
             Fix For: 3.0

Shai just reported this on the dev list.  Simple test:
Directory dir = new RAMDirectory();
IndexWriter writer = new IndexWriter(dir, new SimpleAnalyzer(), MaxFieldLength.UNLIMITED);
writer.addDocument(new Document());

hits this:

Exception in thread "main" _0.prx
    at org.apache.lucene.index.DocumentsWriter.segmentSize(
    at org.apache.lucene.index.DocumentsWriter.flush(
    at org.apache.lucene.index.IndexWriter.doFlushInternal(
    at org.apache.lucene.index.IndexWriter.doFlush(
    at org.apache.lucene.index.IndexWriter.flush(
    at org.apache.lucene.index.IndexWriter.addDocument(
    at org.apache.lucene.index.IndexWriter.addDocument(

Turns out it's just silly -- this is actually an issue I've already fixed on the flex (LUCENE-1458)
branch.  DocumentsWriter has its own method to enumerate the flushed files and compute their
size, but really it shouldn't do that -- it should use SegmentInfo's method, instead.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message