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

multivalued field with offsets makes corrumpt index

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.0-ALPHA, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I was trying to beef up TestBackwardsCompatibility (LUCENE-4085) but i accidentally made a corrupt index due to a typo:

      // a field with both offsets and term vectors for a cross-check
      FieldType customType3 = new FieldType(TextField.TYPE_STORED);
      customType3.setStoreTermVectors(true);
      customType3.setStoreTermVectorPositions(true);
      customType3.setStoreTermVectorOffsets(true);    customType3.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
      doc.add(new Field("content3", "here is more content with aaa aaa aaa", customType3));
      // a field that omits only positions
      FieldType customType4 = new FieldType(TextField.TYPE_STORED);
      customType4.setStoreTermVectors(true);
      customType4.setStoreTermVectorPositions(false);
      customType4.setStoreTermVectorOffsets(true);
      customType4.setIndexOptions(IndexOptions.DOCS_AND_FREQS);
      // check out the copy-paste typo here! i forgot to change this to content4
       doc.add(new Field("content3", "here is more content with aaa aaa aaa", customType3));
      

        Attachments

        1. LUCENE-4139_test.patch
          2 kB
          Robert Muir
        2. LUCENE-4139_test.patch
          1 kB
          Robert Muir
        3. LUCENE-4139.patch
          5 kB
          Robert Muir
        4. LUCENE-4139.patch
          15 kB
          Robert Muir
        5. LUCENE-4139.patch
          15 kB
          Robert Muir

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rcmuir Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: