You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2010/10/21 01:48:31 UTC

svn commit: r1025794 - /lucene/dev/trunk/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java

Author: yonik
Date: Wed Oct 20 23:48:31 2010
New Revision: 1025794

URL: http://svn.apache.org/viewvc?rev=1025794&view=rev
Log:
Suggester: allow float or string as param

Modified:
    lucene/dev/trunk/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java

Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java?rev=1025794&r1=1025793&r2=1025794&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java Wed Oct 20 23:48:31 2010
@@ -76,7 +76,7 @@ public class Suggester extends SolrSpell
     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);