|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.solr.spelling.SolrSpellChecker
public abstract class SolrSpellChecker
Refer to SpellCheckComponent for more details.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
SolrSpellChecker()
|
|
| Method Summary | |
|---|---|
abstract void |
build(SolrCore core,
SolrIndexSearcher searcher)
(re)Builds the spelling index. |
String |
getDictionaryName()
|
Analyzer |
getQueryAnalyzer()
|
SpellingResult |
getSuggestions(Collection<Token> tokens,
IndexReader reader)
Deprecated. This method will be removed in 4.x in favor of getSuggestions(org.apache.solr.spelling.SpellingOptions) |
SpellingResult |
getSuggestions(Collection<Token> tokens,
IndexReader reader,
boolean onlyMorePopular,
boolean extendedResults)
Deprecated. This method will be removed in 4.x in favor of getSuggestions(org.apache.solr.spelling.SpellingOptions) |
SpellingResult |
getSuggestions(Collection<Token> tokens,
IndexReader reader,
int count)
Deprecated. This method will be removed in 4.x in favor of getSuggestions(org.apache.solr.spelling.SpellingOptions) |
abstract SpellingResult |
getSuggestions(Collection<Token> tokens,
IndexReader reader,
int count,
boolean onlyMorePopular,
boolean extendedResults)
Deprecated. This method will be removed in 4.x in favor of getSuggestions(org.apache.solr.spelling.SpellingOptions) |
SpellingResult |
getSuggestions(SpellingOptions options)
Get suggestions for the given query. |
String |
init(NamedList config,
SolrCore core)
|
abstract 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 |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public SolrSpellChecker()
| Method Detail |
|---|
public String init(NamedList config,
SolrCore core)
public Analyzer getQueryAnalyzer()
public String getDictionaryName()
public abstract void reload(SolrCore core,
SolrIndexSearcher searcher)
throws IOException
IOException
public abstract void build(SolrCore core,
SolrIndexSearcher searcher)
@Deprecated
public SpellingResult getSuggestions(Collection<Token> tokens,
IndexReader reader)
throws IOException
getSuggestions(org.apache.solr.spelling.SpellingOptions)
IOExceptiongetSuggestions(Collection, org.apache.lucene.index.IndexReader, int, boolean, boolean)
@Deprecated
public SpellingResult getSuggestions(Collection<Token> tokens,
IndexReader reader,
int count)
throws IOException
getSuggestions(org.apache.solr.spelling.SpellingOptions)
IOExceptiongetSuggestions(Collection, org.apache.lucene.index.IndexReader, int, boolean, boolean)
@Deprecated
public SpellingResult getSuggestions(Collection<Token> tokens,
IndexReader reader,
boolean onlyMorePopular,
boolean extendedResults)
throws IOException
getSuggestions(org.apache.solr.spelling.SpellingOptions)
IOExceptiongetSuggestions(Collection, org.apache.lucene.index.IndexReader, int, boolean, boolean)
@Deprecated
public abstract SpellingResult getSuggestions(Collection<Token> tokens,
IndexReader reader,
int count,
boolean onlyMorePopular,
boolean extendedResults)
throws IOException
getSuggestions(org.apache.solr.spelling.SpellingOptions)
SpellingResult.getSuggestions() suggestions must be ordered by best suggestion first.
tokens - The Tokens to be spell checked.reader - The (optional) IndexReader. If there is not IndexReader, than extendedResults are not possiblecount - The maximum number of suggestions to returnonlyMorePopular - TODOextendedResults - TODO
IOException
public SpellingResult getSuggestions(SpellingOptions options)
throws IOException
SpellingResult.getSuggestions() suggestions must be ordered by best suggestion first.
Note: This method is abstract in Solr 4.0 and beyond and is the recommended way of implementing the spell checker. For now,
it calls getSuggestions(java.util.Collection, org.apache.lucene.index.IndexReader, boolean, boolean).
options - The SpellingOptions to use
SpellingResult suggestions
IOException - if there is an error producing suggestions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||