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

don't write a norm of infinity when analyzer returns no tokens

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0, 6.0
    • None
    • None
    • New

    Description

      When a document doesn't have the field, we fill with zero. when a segment doesn't have the field, we also fill with zero.

      however, when the analyzer doesn't return any terms for the field, we still call similarity.computeNorm(0)... with the default similarity this encodes infinity... -1

      in such a case, it doesnt really matter what the norm is, since it has no terms. But its more efficient for e.g. compression if we consistently use zero.

      Attachments

        1. LUCENE-5978.patch
          2 kB
          Robert Muir

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: