Lucene - Core
  1. Lucene - Core
  2. LUCENE-1548

LevenshteinDistance code normalization is incorrect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.3.1, 2.3.2, 2.4
    • Fix Version/s: 2.4.1, 2.9
    • Component/s: modules/spellchecker
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The normalization of the edit distance should use the maximum of the two string being compared instead of the minimum. Otherwise negative distances are possible. The spell checker filters out edits below a certain threshold so this hasn't been a problem in practice.

      1. LUCENE-1548.patch
        4 kB
        Thomas Morton

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 11h 53m 1 Michael McCandless 27/Feb/09 14:12
        Resolved Resolved Closed Closed
        210d 2h 10m 1 Mark Miller 25/Sep/09 17:23
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12563098 ] jira [ 12584140 ]
        Mark Thomas made changes -
        Workflow jira [ 12453452 ] Default workflow, editable Closed status [ 12563098 ]
        Mark Miller made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Michael McCandless made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.9 [ 12312682 ]
        Hide
        Michael McCandless added a comment -

        Thanks Thomas!

        Show
        Michael McCandless added a comment - Thanks Thomas!
        Hide
        Michael McCandless added a comment -

        Looks good, I'll commit. Thanks Thomas!

        Show
        Michael McCandless added a comment - Looks good, I'll commit. Thanks Thomas!
        Michael McCandless made changes -
        Assignee Michael McCandless [ mikemccand ]
        Thomas Morton made changes -
        Field Original Value New Value
        Attachment LUCENE-1548.patch [ 12400985 ]
        Hide
        Thomas Morton added a comment -

        Fixes issue (changes min to max in distance computation) and corrects unit tests.

        Show
        Thomas Morton added a comment - Fixes issue (changes min to max in distance computation) and corrects unit tests.
        Thomas Morton created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development