Lucene - Core
  1. Lucene - Core
  2. LUCENE-3527

Implement getDistance() on DirectSpellChecker.INTERNAL_LEVENSHTEIN

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.0-ALPHA
    • Component/s: modules/spellchecker
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      DirectSpellChecker.INTERNAL_LEVENSHTEIN is currently not a full-fledged implementation of StringDistance. But an full implementation is needed for Solr's SpellCheckComponent.finishStage(), and also would be helpful for those trying to take the advice given in LIA 2nd ed section sect8.5.3.

      1. LUCENE-3257.patch
        7 kB
        Robert Muir
      2. LUCENE-3527.patch
        7 kB
        Robert Muir
      3. LUCENE-3527.patch
        11 kB
        James Dyer

        Issue Links

          Activity

          Hide
          Robert Muir added a comment -

          Thanks for opening this issue James.

          I updated the patch: for just a one-off comparator (merging distributed results), termsenum/fuzzytermsenum/automata construction is very costly, so I just implemented this the standard way (as LuceneLevenshteinDistance).

          Just like before, DirectSpellChecker doesn't actually use this code, but the distances computations are equivalent.

          Show
          Robert Muir added a comment - Thanks for opening this issue James. I updated the patch: for just a one-off comparator (merging distributed results), termsenum/fuzzytermsenum/automata construction is very costly, so I just implemented this the standard way (as LuceneLevenshteinDistance). Just like before, DirectSpellChecker doesn't actually use this code, but the distances computations are equivalent.
          Hide
          Robert Muir added a comment -

          fix dyslexic patch name, and add another test term that will fail if the distance measure doesn't act like lucene's

          Show
          Robert Muir added a comment - fix dyslexic patch name, and add another test term that will fail if the distance measure doesn't act like lucene's

            People

            • Assignee:
              Unassigned
              Reporter:
              James Dyer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development