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

LevenshteinDistance code normalization is incorrect

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3, 2.3.1, 2.3.2, 2.4
    • 2.4.1, 2.9
    • modules/spellchecker
    • None
    • 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.

      Attachments

        1. LUCENE-1548.patch
          4 kB
          Tom Morton

        Activity

          People

            mikemccand Michael McCandless
            tsmorton Tom Morton
            Votes:
            0 Vote for this issue
            Watchers:
            0 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