From 041534488dd1afc19566cf6246d071a7f5dbaa75 Mon Sep 17 00:00:00 2001 From: Koji Sekiguchi Date: Thu, 21 Oct 2010 00:48:44 +0000 Subject: [PATCH] SOLR-2139: revert 1022357. threshold should be float in solrconfig.xml git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1025803 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 2 -- solr/src/java/org/apache/solr/spelling/suggest/Suggester.java | 2 +- solr/src/test/test-files/solr/conf/solrconfig-spellchecker.xml | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) 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