diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 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() is diff --git a/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java b/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java index 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.xml index 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 @@ true - 0.0 + 0.0