public class ConjunctionSolrSpellChecker extends SolrSpellChecker
This class lets a query be run through multiple spell checkers.
The initial use-case is to use WordBreakSolrSpellChecker
in conjunction with a "standard" spell checker
(such as DirectSolrSpellChecker
analyzer, DEFAULT_DICTIONARY_NAME, DICTIONARY_NAME, field, FIELD, FIELD_TYPE, fieldTypeName, name| Constructor and Description |
|---|
ConjunctionSolrSpellChecker() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChecker(SolrSpellChecker checker) |
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.
|
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.
|
void |
reload(SolrCore core,
SolrIndexSearcher searcher)
Reloads the index.
|
public void addChecker(SolrSpellChecker checker)
public String init(NamedList config, SolrCore core)
init in class SolrSpellCheckerpublic void build(SolrCore core, SolrIndexSearcher searcher) throws IOException
SolrSpellCheckerbuild in class SolrSpellCheckerIOExceptionpublic SpellingResult getSuggestions(SpellingOptions options) throws IOException
SolrSpellCheckerSpellingResult.getSuggestions() suggestions must be ordered by best suggestion first.getSuggestions in class SolrSpellCheckeroptions - The SpellingOptions to useSpellingResult suggestionsIOException - if there is an error producing suggestionspublic SpellingResult mergeSuggestions(SpellCheckMergeData mergeData, int numSug, int count, boolean extendedResults)
SolrSpellCheckermergeSuggestions in class SolrSpellCheckerpublic void reload(SolrCore core, SolrIndexSearcher searcher) throws IOException
SolrSpellCheckerreload in class SolrSpellCheckerIOException - If there is a low-level I/O error.public Analyzer getQueryAnalyzer()
getQueryAnalyzer in class SolrSpellCheckerpublic String getDictionaryName()
getDictionaryName in class SolrSpellCheckerprotected float getAccuracy()
SolrSpellCheckerSpellingParams.SPELLCHECK_ACCURACY if supported.
Otherwise throws UnsupportedOperationException.getAccuracy in class SolrSpellCheckerprotected StringDistance getStringDistance()
SolrSpellCheckergetStringDistance in class SolrSpellCheckerpublic boolean isSuggestionsMayOverlap()
isSuggestionsMayOverlap in class SolrSpellCheckerCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.