public class FileBasedSpellChecker extends AbstractLuceneSpellChecker
A spell checker implementation that loads words from a text file (one word per line).
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
characterEncoding |
private static org.slf4j.Logger |
log |
static java.lang.String |
SOURCE_FILE_CHAR_ENCODING |
static java.lang.String |
WORD_FIELD_NAME |
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 |
|---|
FileBasedSpellChecker() |
| 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)
Override to return null, since there is no reader associated with a file based index
|
java.lang.String |
getCharacterEncoding() |
java.lang.String |
init(NamedList config,
SolrCore core) |
private void |
loadExternalFileDictionary(SolrCore core) |
getAccuracy, getField, getFieldTypeName, getIndexDir, getSourceLocation, getSpellChecker, getStringDistance, getSuggestions, getSuggestions, initIndex, reloadgetDictionaryName, getQueryAnalyzer, getSuggestions, getSuggestions, getSuggestionsprivate static final org.slf4j.Logger log
public static final java.lang.String SOURCE_FILE_CHAR_ENCODING
private java.lang.String characterEncoding
public static final java.lang.String WORD_FIELD_NAME
public java.lang.String init(NamedList config, SolrCore core)
init in class AbstractLuceneSpellCheckerpublic 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 AbstractLuceneSpellCheckerprivate void loadExternalFileDictionary(SolrCore core)
public java.lang.String getCharacterEncoding()