public class AlfrescoSolrSuggester extends Object implements org.apache.lucene.util.Accountable
Lookup and
Dictionary| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DICT_NAME
Name used when an unnamed suggester config is passed
|
static String |
DICTIONARY_IMPL
Fully-qualified class of the
Dictionary implementation |
static String |
LOCATION
Location of the source data - either a path to a file, or null for the
current IndexReader.
|
static String |
LOOKUP_IMPL
Fully-qualified class of the
Lookup implementation. |
static String |
NAME
Label to identify the name of the suggester
|
static String |
STORE_DIR
Name of the location where to persist the dictionary.
|
| Constructor and Description |
|---|
AlfrescoSolrSuggester() |
| Modifier and Type | Method and Description |
|---|---|
void |
build(org.apache.solr.core.SolrCore core,
org.apache.solr.search.SolrIndexSearcher searcher)
Build the underlying Lucene Suggester
|
String |
getName()
Returns the unique name of the suggester
|
org.apache.solr.spelling.suggest.SuggesterResult |
getSuggestions(org.apache.solr.spelling.suggest.SuggesterOptions options)
Returns suggestions based on the
SuggesterOptions passed |
String |
init(org.apache.solr.common.util.NamedList<?> config,
org.apache.solr.core.SolrCore core)
Uses the
config and the core to initialize the underlying
Lucene suggester |
long |
ramBytesUsed() |
void |
reload(org.apache.solr.core.SolrCore core,
org.apache.solr.search.SolrIndexSearcher searcher)
Reloads the underlying Lucene Suggester
|
String |
toString() |
public static final String DEFAULT_DICT_NAME
public static final String NAME
public static final String LOCATION
public static final String LOOKUP_IMPL
Lookup implementation.public static final String DICTIONARY_IMPL
Dictionary implementationpublic static final String STORE_DIR
public String init(org.apache.solr.common.util.NamedList<?> config, org.apache.solr.core.SolrCore core)
config and the core to initialize the underlying
Lucene suggesterpublic void build(org.apache.solr.core.SolrCore core,
org.apache.solr.search.SolrIndexSearcher searcher)
throws IOException
IOExceptionpublic void reload(org.apache.solr.core.SolrCore core,
org.apache.solr.search.SolrIndexSearcher searcher)
throws IOException
IOExceptionpublic org.apache.solr.spelling.suggest.SuggesterResult getSuggestions(org.apache.solr.spelling.suggest.SuggesterOptions options)
throws IOException
SuggesterOptions passedIOExceptionpublic String getName()
public long ramBytesUsed()
ramBytesUsed in interface org.apache.lucene.util.AccountableCopyright © 2005–2017 Alfresco Software. All rights reserved.