Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1179

AssertionError on creating doc containing field with empty string as field name

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.1, 2.4
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Spinoff from here:

      http://www.gossamer-threads.com/lists/lucene/java-user/58496

      Pre-2.3 you were allowed to add Fields to a Document where the field name is the empty string. In 2.3.0 it broke: you hit this during flush:

      java.lang.AssertionError
          at org.apache.lucene.index.TermInfosWriter.add(TermInfosWriter.java:143)
          at org.apache.lucene.index.DocumentsWriter.appendPostings(DocumentsWriter.java:2290)
          at org.apache.lucene.index.DocumentsWriter.writeSegment(DocumentsWriter.java:1985)
          at org.apache.lucene.index.DocumentsWriter.flush(DocumentsWriter.java:539)
          at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:2497)
          at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:2397)
          at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1204)
          at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1178)
          at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1153) 
      

      The bug is just an over-aggressive assert statement. I'll commit a fix shortly & port to 2.3 branch for 2.3.1 release.

        Attachments

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: