use of org.apache.solr.spelling.ConjunctionSolrSpellChecker in project lucene-solr by apache.
the class SpellCheckComponent method getSpellChecker.
protected SolrSpellChecker getSpellChecker(SolrParams params) {
String[] dictName = getDictionaryNames(params);
if (dictName.length == 1) {
return spellCheckers.get(dictName[0]);
} else {
String singleStr = getDictionaryNameAsSingleString(dictName);
SolrSpellChecker ssc = spellCheckers.get(singleStr);
if (ssc == null) {
ConjunctionSolrSpellChecker cssc = new ConjunctionSolrSpellChecker();
for (String dn : dictName) {
cssc.addChecker(spellCheckers.get(dn));
}
ssc = cssc;
}
return ssc;
}
}
Aggregations