Lucene.Net
  1. Lucene.Net
  2. LUCENENET-359

Spellchecker accuracy gets overwritten

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      Spellchecker.cs line 205 has the following:

      //if queue full , maintain the min score
      min = ((SuggestWord) sugqueue.Top()).score;

      what this is doing is resetting min to be the highest of the suggestions found so far. This is fine, except that min is a global, persistent variable. So if you set min to be .5, do a search that has a result of .9, your next search will have a min of .9, which means that the next suggestion probably will fail.

      Fix would just be to make a localMin copy or some such and update that.

        Activity

        Hide
        Digy added a comment -

        Hi Ben,
        Can you test the attached patch?
        If it's OK, I will commit.

        DIGY

        Show
        Digy added a comment - Hi Ben, Can you test the attached patch? If it's OK, I will commit. DIGY
        Hide
        Ben West added a comment -

        Works for me.

        Thanks Digy.

        Show
        Ben West added a comment - Works for me. Thanks Digy.
        Hide
        Digy added a comment -

        committed.
        DIGY

        Show
        Digy added a comment - committed. DIGY
        Hide
        Scott Lombard added a comment -

        Bulk Close for all issues before incubation

        Show
        Scott Lombard added a comment - Bulk Close for all issues before incubation

          People

          • Assignee:
            Digy
            Reporter:
            Ben West
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development