|
|||||||||
| 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 SolrSpellCheckerIOException
public SpellingResult getSuggestions(SpellingOptions options)
throws IOException
SolrSpellCheckerSpellingResult.getSuggestions() suggestions must be ordered by best suggestion first.
getSuggestions in class SolrSpellCheckeroptions - The SpellingOptions to use
SpellingResult suggestions
IOException - if there is an error producing suggestions
public 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 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()
SolrSpellChecker
getStringDistance in class SolrSpellCheckerpublic boolean isSuggestionsMayOverlap()
isSuggestionsMayOverlap in class SolrSpellChecker
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||