From 3afc9192b9b656e1a1843e0c30a1583359089b00 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 1 Jun 2006 21:36:13 +0000 Subject: [PATCH] SpellChecker min score is incorrectly changed by suggestSimilar: LUCENE-575 git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@410971 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 7 +++++-- .../java/org/apache/lucene/search/spell/SpellChecker.java | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 63b8a870db1..997c7043593 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,10 +16,13 @@ API Changes Bug fixes 1. Fixed the web application demo (built with "ant war-demo") which - didn't work because it used a QueryParser method that had + didn't work because it used a QueryParser method that had been removed (Daniel Naber) - 2. LUCENE-583: ISOLatin1AccentFilter fails to preserve positionIncrement + 2. LUCENE-583: ISOLatin1AccentFilter fails to preserve positionIncrement + (Yonik Seeley) + + 3. LUCENE-575: SpellChecker min score is incorrectly changed by suggestSimilar (Yonik Seeley) Optimizations diff --git a/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java b/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java index 5cec1f894ab..f0923958d8f 100755 --- a/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java +++ b/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java @@ -125,6 +125,7 @@ public class SpellChecker { public String[] suggestSimilar (String word, int num_sug, IndexReader ir, String field , boolean morePopular) throws IOException { + float min = this.min; final TRStringDistance sd=new TRStringDistance(word); final int lengthWord=word.length();