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
This commit is contained in:
Yonik Seeley 2010-10-20 23:48:31 +00:00
parent 6bd7b93a71
commit c99ac478c5
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public class Suggester extends SolrSpellChecker {
LOG.info("init: " + config); LOG.info("init: " + config);
String name = super.init(config, core); String name = super.init(config, core);
threshold = config.get(THRESHOLD_TOKEN_FREQUENCY) == null ? 0.0f 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); sourceLocation = (String) config.get(LOCATION);
field = (String)config.get(FIELD); field = (String)config.get(FIELD);
lookupImpl = (String)config.get(LOOKUP_IMPL); lookupImpl = (String)config.get(LOOKUP_IMPL);