|
|||||||||
| 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.suggest.Suggester
public class Suggester
| Field Summary | |
|---|---|
protected SolrCore |
core
|
protected Dictionary |
dictionary
|
static String |
LOCATION
Location of the source data - either a path to a file, or null for the current IndexReader. |
protected Lookup |
lookup
|
static String |
LOOKUP_IMPL
Fully-qualified class of the Lookup implementation. |
protected String |
lookupImpl
|
protected IndexReader |
reader
|
protected String |
sourceLocation
|
static String |
STORE_DIR
Name of the location where to persist the dictionary. |
protected File |
storeDir
|
protected float |
threshold
|
static String |
THRESHOLD_TOKEN_FREQUENCY
Minimum frequency of terms to consider when building the dictionary. |
| Fields inherited from class org.apache.solr.spelling.SolrSpellChecker |
|---|
analyzer, DEFAULT_DICTIONARY_NAME, DICTIONARY_NAME, field, FIELD, FIELD_TYPE, fieldTypeName, name |
| Constructor Summary | |
|---|---|
Suggester()
|
|
| Method Summary | |
|---|---|
void |
build(SolrCore core,
SolrIndexSearcher searcher)
(re)Builds the spelling index. |
SpellingResult |
getSuggestions(SpellingOptions options)
Get suggestions for the given query. |
String |
init(NamedList config,
SolrCore core)
|
void |
reload(SolrCore core,
SolrIndexSearcher searcher)
Reloads the index. |
| Methods inherited from class org.apache.solr.spelling.SolrSpellChecker |
|---|
getAccuracy, getDictionaryName, getQueryAnalyzer, getStringDistance, isSuggestionsMayOverlap, mergeSuggestions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOCATION
public static final String LOOKUP_IMPL
Lookup implementation.
public static final String THRESHOLD_TOKEN_FREQUENCY
public static final String STORE_DIR
protected String sourceLocation
protected File storeDir
protected float threshold
protected Dictionary dictionary
protected IndexReader reader
protected Lookup lookup
protected String lookupImpl
protected SolrCore core
| Constructor Detail |
|---|
public Suggester()
| Method Detail |
|---|
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 void reload(SolrCore core,
SolrIndexSearcher searcher)
throws IOException
SolrSpellChecker
reload in class SolrSpellCheckerIOException - If there is a low-level I/O error.
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||