public abstract class SolrSpellChecker extends Object
Refer to SpellCheckComponent for more details.
Modifier and Type | Field and Description |
---|---|
protected Analyzer |
analyzer |
static String |
DEFAULT_DICTIONARY_NAME |
static String |
DICTIONARY_NAME |
protected String |
field |
static String |
FIELD |
static String |
FIELD_TYPE |
protected String |
fieldTypeName |
protected String |
name
Dictionary name
|
Constructor and Description |
---|
SolrSpellChecker() |
Modifier and Type | Method and Description |
---|---|
abstract void |
build(SolrCore core,
SolrIndexSearcher searcher)
(re)Builds the spelling index.
|
protected float |
getAccuracy()
Get the value of
SpellingParams.SPELLCHECK_ACCURACY if supported. |
String |
getDictionaryName() |
Analyzer |
getQueryAnalyzer() |
protected StringDistance |
getStringDistance()
Get the distance implementation used by this spellchecker, or NULL if not applicable.
|
abstract SpellingResult |
getSuggestions(SpellingOptions options)
Get suggestions for the given query.
|
String |
init(NamedList config,
SolrCore core) |
boolean |
isSuggestionsMayOverlap() |
SpellingResult |
mergeSuggestions(SpellCheckMergeData mergeData,
int numSug,
int count,
boolean extendedResults)
Integrate spelling suggestions from the various shards in a distributed environment.
|
abstract void |
reload(SolrCore core,
SolrIndexSearcher searcher)
Reloads the index.
|
public static final String DICTIONARY_NAME
public static final String DEFAULT_DICTIONARY_NAME
public static final String FIELD
public static final String FIELD_TYPE
protected String name
protected Analyzer analyzer
protected String field
protected String fieldTypeName
public SpellingResult mergeSuggestions(SpellCheckMergeData mergeData, int numSug, int count, boolean extendedResults)
public Analyzer getQueryAnalyzer()
public String getDictionaryName()
public abstract void reload(SolrCore core, SolrIndexSearcher searcher) throws IOException
IOException
- If there is a low-level I/O error.public abstract void build(SolrCore core, SolrIndexSearcher searcher) throws IOException
IOException
protected float getAccuracy()
SpellingParams.SPELLCHECK_ACCURACY
if supported.
Otherwise throws UnsupportedOperationException.protected StringDistance getStringDistance()
public abstract SpellingResult getSuggestions(SpellingOptions options) throws IOException
SpellingResult.getSuggestions()
suggestions must be ordered by best suggestion first.options
- The SpellingOptions
to useSpellingResult
suggestionsIOException
- if there is an error producing suggestionspublic boolean isSuggestionsMayOverlap()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.