public class SuggestComponent extends SearchComponent implements SolrCoreAware, SuggesterParams, Accountable
SolrSuggester to serve up suggestions
Responsible for routing commands and queries to the appropriate SolrSuggester
and for initializing them as specified by SolrConfigSolrInfoMBean.Category| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_NAME
Name used to identify whether the user query concerns this component
|
protected NamedList |
initParams |
protected Map<String,SolrSuggester> |
suggesters
Key is the dictionary name used in SolrConfig, value is the corresponding
SolrSuggester |
SUGGEST_BUILD, SUGGEST_BUILD_ALL, SUGGEST_COUNT, SUGGEST_DICT, SUGGEST_PREFIX, SUGGEST_Q, SUGGEST_RELOAD, SUGGEST_RELOAD_ALL| Constructor and Description |
|---|
SuggestComponent() |
| Modifier and Type | Method and Description |
|---|---|
int |
distributedProcess(ResponseBuilder rb)
Dispatch shard request in
STAGE_EXECUTE_QUERY stage |
void |
finishStage(ResponseBuilder rb)
Used in Distributed Search, merges the suggestion results from every shard
|
String |
getDescription()
Simple one or two line description
|
String |
getSource()
CVS Source, SVN Source, etc
|
NamedList |
getStatistics()
Any statistics this instance would like to be publicly available via
the Solr Administration interface.
|
void |
inform(SolrCore core) |
void |
init(NamedList args) |
void |
prepare(ResponseBuilder rb)
Responsible for issuing build and rebload command to the specified
SolrSuggester |
void |
process(ResponseBuilder rb)
Responsible for using the specified suggester to get the suggestions
for the query and write the results
|
long |
ramBytesUsed() |
getCategory, getDocs, getName, getVersion, handleResponses, modifyRequest, setNamepublic static final String COMPONENT_NAME
protected NamedList initParams
protected Map<String,SolrSuggester> suggesters
SolrSuggesterpublic void init(NamedList args)
init in interface NamedListInitializedPlugininit in class SearchComponentpublic void inform(SolrCore core)
inform in interface SolrCoreAwarepublic void prepare(ResponseBuilder rb) throws IOException
SolrSuggesterprepare in class SearchComponentrb - The ResponseBuilderIOException - If there is a low-level I/O error.public int distributedProcess(ResponseBuilder rb)
STAGE_EXECUTE_QUERY stagedistributedProcess in class SearchComponentpublic void process(ResponseBuilder rb) throws IOException
process in class SearchComponentrb - The ResponseBuilderIOException - If there is a low-level I/O error.public void finishStage(ResponseBuilder rb)
finishStage in class SearchComponentpublic String getDescription()
SolrInfoMBeangetDescription in interface SolrInfoMBeangetDescription in class SearchComponentpublic String getSource()
SolrInfoMBeangetSource in interface SolrInfoMBeangetSource in class SearchComponentpublic NamedList getStatistics()
SolrInfoMBean
Any Object type may be stored in the list, but only the
toString() representation will be used.
getStatistics in interface SolrInfoMBeangetStatistics in class SearchComponentpublic long ramBytesUsed()
ramBytesUsed in interface AccountableCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.