public class AsyncBuildSuggestComponent
extends org.apache.solr.handler.component.SearchComponent
implements org.apache.solr.util.plugin.SolrCoreAware, org.apache.solr.spelling.suggest.SuggesterParams, org.apache.lucene.util.Accountable
SuggestComponent and modified, this
class provides a SearchComponent that builds SolrSuggester
objects asynchronously to avoid blocking search
requests or increasing startup time of the servlet container.SuggestComponent| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_NAME
Name used to identify whether the user query concerns this component
|
protected org.apache.solr.common.util.NamedList |
initParams |
protected Map<String,org.alfresco.solr.component.AsyncBuildSuggestComponent.SuggesterCache> |
suggesters
Key is the dictionary name used in SolrConfig, value is the corresponding
SolrSuggester |
protected static TempFileWarningLogger |
tempFileWarningLogger |
| Constructor and Description |
|---|
AsyncBuildSuggestComponent() |
| Modifier and Type | Method and Description |
|---|---|
int |
distributedProcess(org.apache.solr.handler.component.ResponseBuilder rb)
Dispatch shard request in
STAGE_EXECUTE_QUERY stage |
void |
finishStage(org.apache.solr.handler.component.ResponseBuilder rb)
Used in Distributed Search, merges the suggestion results from every shard
|
Collection<org.apache.lucene.util.Accountable> |
getChildResources() |
String |
getDescription() |
String |
getSource() |
org.apache.solr.common.util.NamedList<String> |
getStatistics() |
void |
inform(org.apache.solr.core.SolrCore core) |
void |
init(org.apache.solr.common.util.NamedList args) |
void |
prepare(org.apache.solr.handler.component.ResponseBuilder rb)
Responsible for issuing build and rebload command to the specified
SolrSuggester |
void |
process(org.apache.solr.handler.component.ResponseBuilder rb)
Responsible for using the specified suggester to get the suggestions
for the query and write the results
|
long |
ramBytesUsed() |
public static final String COMPONENT_NAME
protected static TempFileWarningLogger tempFileWarningLogger
protected org.apache.solr.common.util.NamedList initParams
protected Map<String,org.alfresco.solr.component.AsyncBuildSuggestComponent.SuggesterCache> suggesters
SolrSuggesterpublic void init(org.apache.solr.common.util.NamedList args)
init in interface org.apache.solr.util.plugin.NamedListInitializedPlugininit in class org.apache.solr.handler.component.SearchComponentpublic void inform(org.apache.solr.core.SolrCore core)
inform in interface org.apache.solr.util.plugin.SolrCoreAwarepublic void prepare(org.apache.solr.handler.component.ResponseBuilder rb)
throws IOException
SolrSuggesterprepare in class org.apache.solr.handler.component.SearchComponentIOExceptionpublic int distributedProcess(org.apache.solr.handler.component.ResponseBuilder rb)
STAGE_EXECUTE_QUERY stagedistributedProcess in class org.apache.solr.handler.component.SearchComponentpublic void process(org.apache.solr.handler.component.ResponseBuilder rb)
throws IOException
process in class org.apache.solr.handler.component.SearchComponentIOExceptionpublic void finishStage(org.apache.solr.handler.component.ResponseBuilder rb)
finishStage in class org.apache.solr.handler.component.SearchComponentpublic String getDescription()
getDescription in interface org.apache.solr.core.SolrInfoMBeangetDescription in class org.apache.solr.handler.component.SearchComponentpublic String getSource()
getSource in interface org.apache.solr.core.SolrInfoMBeangetSource in class org.apache.solr.handler.component.SearchComponentpublic org.apache.solr.common.util.NamedList<String> getStatistics()
getStatistics in interface org.apache.solr.core.SolrInfoMBeangetStatistics in class org.apache.solr.handler.component.SearchComponentpublic long ramBytesUsed()
ramBytesUsed in interface org.apache.lucene.util.Accountablepublic Collection<org.apache.lucene.util.Accountable> getChildResources()
getChildResources in interface org.apache.lucene.util.AccountableCopyright © 2005–2020 Alfresco Software. All rights reserved.