mirror of https://github.com/apache/lucene.git
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:
parent
6bd7b93a71
commit
c99ac478c5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue