From c99ac478c5c8070111296f9adb8dff72b498fb8e Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Wed, 20 Oct 2010 23:48:31 +0000 Subject: [PATCH] Suggester: allow float or string as param git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1025794 13f79535-47bb-0310-9956-ffa450edef68 --- solr/src/java/org/apache/solr/spelling/suggest/Suggester.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8ba1077fb3f..5948fcd75ac 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)config.get(THRESHOLD_TOKEN_FREQUENCY); + : Float.parseFloat(config.get(THRESHOLD_TOKEN_FREQUENCY).toString()); sourceLocation = (String) config.get(LOCATION); field = (String)config.get(FIELD); lookupImpl = (String)config.get(LOOKUP_IMPL);