Lucene - Core
  1. Lucene - Core
  2. LUCENE-3796

Disallow setBoost() on StringField, throw exception if boosts are set if norms are omitted

    Details

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

      Description

      Occasionally users are confused why index-time boosts are not applied to their norms-omitted fields.

      This is because we silently discard the boost: there is no reason for this!

      The most absurd part: in 4.0 you can make a StringField and call setBoost and nothing complains... (more reasons to remove StringField totally in my opinion)

      1. LUCENE-3796.patch
        7 kB
        Robert Muir
      2. LUCENE-3796.patch
        2 kB
        Robert Muir

        Activity

        Hide
        Uwe Schindler added a comment -

        +1 to apply patch. This also effects NumericFields and any other norms-free field.

        Show
        Uwe Schindler added a comment - +1 to apply patch. This also effects NumericFields and any other norms-free field.
        Hide
        Robert Muir added a comment -

        updated patch: also fixing tests, and making the exception clearer (including the fieldname).

        I think its ready to commit

        Show
        Robert Muir added a comment - updated patch: also fixing tests, and making the exception clearer (including the fieldname). I think its ready to commit
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        Uwe Schindler added a comment -

        +1, heavy committing!

        Show
        Uwe Schindler added a comment - +1, heavy committing!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development