Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SpellChecker min score is incorrectly changed by suggestSimilar: LUCENE-575

Yonik Seeley3afc9192b9b6
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();