public class IndexBasedSpellChecker extends AbstractLuceneSpellChecker
A spell checker implementation that loads words from Solr as well as arbitary Lucene indices.
Refer to SpellCheckComponent for more details.
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
log |
protected org.apache.lucene.index.IndexReader |
reader |
protected float |
threshold |
static java.lang.String |
THRESHOLD_TOKEN_FREQUENCY |
accuracy, ACCURACY, COMPARATOR_CLASS, DEFAULT_SUGGESTION_COUNT, dictionary, FIELD, FREQ_COMP, index, INDEX_DIR, indexDir, LOCATION, SCORE_COMP, sd, sourceLocation, spellChecker, SPELLCHECKER_ARG_NAME, STRING_DISTANCEanalyzer, DEFAULT_DICTIONARY_NAME, DICTIONARY_NAME, field, FIELD_TYPE, fieldTypeName, name| Constructor and Description |
|---|
IndexBasedSpellChecker() |
| Modifier and Type | Method and Description |
|---|---|
void |
build(SolrCore core,
SolrIndexSearcher searcher)
(re)Builds the spelling index.
|
protected org.apache.lucene.index.IndexReader |
determineReader(org.apache.lucene.index.IndexReader reader) |
float |
getThreshold() |
java.lang.String |
init(NamedList config,
SolrCore core) |
private void |
initSourceReader() |
void |
reload(SolrCore core,
SolrIndexSearcher searcher)
Reloads the index.
|
getAccuracy, getField, getFieldTypeName, getIndexDir, getSourceLocation, getSpellChecker, getStringDistance, getSuggestions, getSuggestions, initIndexgetDictionaryName, getQueryAnalyzer, getSuggestions, getSuggestions, getSuggestionsprivate static final org.slf4j.Logger log
public static final java.lang.String THRESHOLD_TOKEN_FREQUENCY
protected float threshold
protected org.apache.lucene.index.IndexReader reader
public java.lang.String init(NamedList config, SolrCore core)
init in class AbstractLuceneSpellCheckerprivate void initSourceReader()
public void build(SolrCore core, SolrIndexSearcher searcher)
SolrSpellCheckerbuild in class SolrSpellCheckerprotected org.apache.lucene.index.IndexReader determineReader(org.apache.lucene.index.IndexReader reader)
determineReader in class AbstractLuceneSpellCheckerpublic void reload(SolrCore core, SolrIndexSearcher searcher) throws java.io.IOException
SolrSpellCheckerreload in class AbstractLuceneSpellCheckerjava.io.IOExceptionpublic float getThreshold()