Apache Lucene open-source search software
SOLR-2139: revert 1022357. threshold should be float in solrconfig.xml
Koji Sekiguchi041534488dd1
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex d568df0ae72..893eb0e996b 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -523,8 +523,6 @@ Bug Fixes* SOLR-2148: Highlighter doesn't support q.alt. (koji)-* SOLR-2139: Wrong cast from string to float (Igor Rodionov via koji)-* SOLR-2157 Suggester should return alpha-sorted results when onlyMorePopular=false (ab)* SOLR-1794: Dataimport of CLOB fields fails when getCharacterStream() isdiff --git a/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java b/solr/src/java/org/apache/solr/spelling/suggest/Suggester.javaindex 5948fcd75ac..8ba1077fb3f 100644--- a/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java+++ b/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java@@ -76,7 +76,7 @@ public class Suggester extends SolrSpellChecker {LOG.info("init: " + config);String name = super.init(config, core);threshold = config.get(THRESHOLD_TOKEN_FREQUENCY) == null ? 0.0f- : Float.parseFloat(config.get(THRESHOLD_TOKEN_FREQUENCY).toString());+ : (Float)config.get(THRESHOLD_TOKEN_FREQUENCY);sourceLocation = (String) config.get(LOCATION);field = (String)config.get(FIELD);lookupImpl = (String)config.get(LOOKUP_IMPL);diff --git a/solr/src/test/test-files/solr/conf/solrconfig-spellchecker.xml b/solr/src/test/test-files/solr/conf/solrconfig-spellchecker.xmlindex 72a2a40ebbb..ece18d8d7b3 100644--- a/solr/src/test/test-files/solr/conf/solrconfig-spellchecker.xml+++ b/solr/src/test/test-files/solr/conf/solrconfig-spellchecker.xml@@ -103,7 +103,7 @@<str name="buildOnCommit">true</str><!-- Suggester properties -->- <str name="threshold">0.0</str>+ <float name="threshold">0.0</float><!--<str name="sourceLocation">american-english</str>-->