public class IndexBasedSpellChecker extends AbstractLuceneSpellChecker
A spell checker implementation that loads words from Solr as well as arbitrary Lucene indices.
Refer to SpellCheckComponent for more details.
| Modifier and Type | Field and Description |
|---|---|
protected IndexReader |
reader |
protected float |
threshold |
static 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 IndexReader |
determineReader(IndexReader reader) |
float |
getThreshold() |
String |
init(NamedList config,
SolrCore core) |
void |
reload(SolrCore core,
SolrIndexSearcher searcher)
Reloads the index.
|
getAccuracy, getField, getFieldTypeName, getIndexDir, getSourceLocation, getSpellChecker, getStringDistance, getSuggestions, initIndexgetDictionaryName, getQueryAnalyzer, isSuggestionsMayOverlap, mergeSuggestionspublic static final String THRESHOLD_TOKEN_FREQUENCY
protected float threshold
protected IndexReader reader
public String init(NamedList config, SolrCore core)
init in class AbstractLuceneSpellCheckerpublic void build(SolrCore core, SolrIndexSearcher searcher) throws IOException
SolrSpellCheckerbuild in class SolrSpellCheckerIOExceptionprotected IndexReader determineReader(IndexReader reader)
determineReader in class AbstractLuceneSpellCheckerpublic void reload(SolrCore core, SolrIndexSearcher searcher) throws IOException
SolrSpellCheckerreload in class AbstractLuceneSpellCheckerIOException - If there is a low-level I/O error.public float getThreshold()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.