lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r1025794 - /lucene/dev/trunk/solr/src/java/org/apache/solr/spelling/suggest/Suggester.java
Date Wed, 20 Oct 2010 23:48:31 GMT
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);



Mime
View raw message