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

creating empty field + empty term leads to invalid index

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4
    • 3.5
    • None
    • None
    • New

    Description

      Spinoff from LUCENE-3526.

      • if you create new Field("", ""), you get IllegalArgumentException from Field's ctor: "name and value cannot both be empty"
      • But there are tons of other ways to index an empty term for the empty field (for example initially make it "garbage" then .setValue(""), or via tokenstream).
      • If you do this, and you have assertions enabled, you will trip an assert (the assert is fixed in trunk, in LUCENE-3526)
      • But If you don't have assertions enabled, you will create a corrupt index: test: terms, freq, prox...ERROR [term : docFreq=1 != num docs seen 0 + num docs deleted 0]

      Attachments

        1. LUCENE-3529_test.patch
          3 kB
          Robert Muir
        2. LUCENE-3529.patch
          5 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: