|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.spelling.SolrSpellChecker
org.apache.solr.spelling.ConjunctionSolrSpellChecker
public class ConjunctionSolrSpellChecker
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
Field Summary |
---|
Fields inherited from class org.apache.solr.spelling.SolrSpellChecker |
---|
analyzer, DEFAULT_DICTIONARY_NAME, DICTIONARY_NAME, field, FIELD, FIELD_TYPE, fieldTypeName, name |
Constructor Summary | |
---|---|
ConjunctionSolrSpellChecker()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConjunctionSolrSpellChecker()
Method Detail |
---|
public void addChecker(SolrSpellChecker checker)
public String init(NamedList config, SolrCore core)
init
in class SolrSpellChecker
public void build(SolrCore core, SolrIndexSearcher searcher) throws IOException
SolrSpellChecker
build
in class SolrSpellChecker
IOException
public SpellingResult getSuggestions(SpellingOptions options) throws IOException
SolrSpellChecker
SpellingResult.getSuggestions()
suggestions must be ordered by best suggestion first.
getSuggestions
in class SolrSpellChecker
options
- The SpellingOptions
to use
SpellingResult
suggestions
IOException
- if there is an error producing suggestionspublic SpellingResult mergeSuggestions(SpellCheckMergeData mergeData, int numSug, int count, boolean extendedResults)
SolrSpellChecker
mergeSuggestions
in class SolrSpellChecker
public void reload(SolrCore core, SolrIndexSearcher searcher) throws IOException
SolrSpellChecker
reload
in class SolrSpellChecker
IOException
- If there is a low-level I/O error.public Analyzer getQueryAnalyzer()
getQueryAnalyzer
in class SolrSpellChecker
public String getDictionaryName()
getDictionaryName
in class SolrSpellChecker
protected float getAccuracy()
SolrSpellChecker
SpellingParams.SPELLCHECK_ACCURACY
if supported.
Otherwise throws UnsupportedOperationException.
getAccuracy
in class SolrSpellChecker
protected StringDistance getStringDistance()
SolrSpellChecker
getStringDistance
in class SolrSpellChecker
public boolean isSuggestionsMayOverlap()
isSuggestionsMayOverlap
in class SolrSpellChecker
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |