|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.handler.component.SearchComponent org.apache.solr.handler.component.SuggestComponent
public class SuggestComponent
SuggestComponent: interacts with multiple SolrSuggester
to serve up suggestions
Responsible for routing commands and queries to the appropriate SolrSuggester
and for initializing them as specified by SolrConfig
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean |
---|
SolrInfoMBean.Category |
Field Summary | |
---|---|
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 corrosponding SolrSuggester |
Fields inherited from interface org.apache.solr.spelling.suggest.SuggesterParams |
---|
SUGGEST_BUILD, SUGGEST_BUILD_ALL, SUGGEST_COUNT, SUGGEST_DICT, SUGGEST_PREFIX, SUGGEST_Q, SUGGEST_RELOAD, SUGGEST_RELOAD_ALL |
Constructor Summary | |
---|---|
SuggestComponent()
|
Method Summary | |
---|---|
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 |
sizeInBytes()
Returns the total size of all the suggester |
Methods inherited from class org.apache.solr.handler.component.SearchComponent |
---|
getCategory, getDocs, getName, getVersion, handleResponses, modifyRequest, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COMPONENT_NAME
protected NamedList initParams
protected Map<String,SolrSuggester> suggesters
SolrSuggester
Constructor Detail |
---|
public SuggestComponent()
Method Detail |
---|
public void init(NamedList args)
init
in interface NamedListInitializedPlugin
init
in class SearchComponent
public void inform(SolrCore core)
inform
in interface SolrCoreAware
public void prepare(ResponseBuilder rb) throws IOException
SolrSuggester
prepare
in class SearchComponent
rb
- The ResponseBuilder
IOException
- If there is a low-level I/O error.public int distributedProcess(ResponseBuilder rb)
STAGE_EXECUTE_QUERY
stage
distributedProcess
in class SearchComponent
public void process(ResponseBuilder rb) throws IOException
process
in class SearchComponent
rb
- The ResponseBuilder
IOException
- If there is a low-level I/O error.public void finishStage(ResponseBuilder rb)
finishStage
in class SearchComponent
public String getDescription()
SolrInfoMBean
getDescription
in interface SolrInfoMBean
getDescription
in class SearchComponent
public String getSource()
SolrInfoMBean
getSource
in interface SolrInfoMBean
getSource
in class SearchComponent
public NamedList getStatistics()
SolrInfoMBean
Any Object type may be stored in the list, but only the
toString()
representation will be used.
getStatistics
in interface SolrInfoMBean
getStatistics
in class SearchComponent
public long sizeInBytes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |