You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "O. Klein" <kl...@octoweb.nl> on 2011/09/21 13:08:22 UTC
Fuzzy Suggester
>From http://wiki.apache.org/solr/Suggester:
JaspellLookup can provide "fuzzy" suggestions, though this functionality is
not currently exposed (it's a one line change in JaspellLookup).
Anybody know what change this would have to be?
--
View this message in context: http://lucene.472066.n3.nabble.com/Fuzzy-Suggester-tp3355111p3355111.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Fuzzy Suggester
Posted by alioral <al...@gmail.com>.
usePrefix value is set true in JaspellLookup class. This value needs to be
set to false in order to enable matchAlmost method which I believe performs
fuzzy search.
@Override
public List<LookupResult> lookup(String key, boolean onlyMorePopular, int
num) {
List<LookupResult> res = new ArrayList<LookupResult>();
List<String> list;
int count = onlyMorePopular ? num * 2 : num;
if (usePrefix) {
list = trie.matchPrefix(key, count);
} else {
list = trie.matchAlmost(key, count);
}
--
View this message in context: http://lucene.472066.n3.nabble.com/Fuzzy-Suggester-tp3355111p3987674.html
Sent from the Solr - User mailing list archive at Nabble.com.