public class SpellCheckComponent extends SearchComponent implements SolrCoreAware, SpellingParams
Refer to http://wiki.apache.org/solr/SpellCheckComponent for more details
SolrInfoBean.Category, SolrInfoBean.Group| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_NAME
Base name for all spell checker query parameters.
|
static boolean |
DEFAULT_ONLY_MORE_POPULAR |
protected NamedList |
initParams |
protected QueryConverter |
queryConverter |
protected Map<String,SolrSpellChecker> |
spellCheckers
Key is the dictionary, value is the SpellChecker for that dictionary name
|
metricNames, registry, standard_componentsSPELLCHECK_ACCURACY, SPELLCHECK_ALTERNATIVE_TERM_COUNT, SPELLCHECK_BUILD, SPELLCHECK_COLLATE, SPELLCHECK_COLLATE_EXTENDED_RESULTS, SPELLCHECK_COLLATE_MAX_COLLECT_DOCS, SPELLCHECK_COLLATE_PARAM_OVERRIDE, SPELLCHECK_COUNT, SPELLCHECK_DICT, SPELLCHECK_EXTENDED_RESULTS, SPELLCHECK_MAX_COLLATION_EVALUATIONS, SPELLCHECK_MAX_COLLATION_TRIES, SPELLCHECK_MAX_COLLATIONS, SPELLCHECK_MAX_RESULTS_FOR_SUGGEST, SPELLCHECK_MAX_RESULTS_FOR_SUGGEST_FQ, SPELLCHECK_ONLY_MORE_POPULAR, SPELLCHECK_PREFIX, SPELLCHECK_Q, SPELLCHECK_RELOAD| Constructor and Description |
|---|
SpellCheckComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCollationsToResponse(SolrParams params,
SpellingResult spellingResult,
ResponseBuilder rb,
String q,
NamedList response,
boolean suggestionsMayOverlap) |
void |
finishStage(ResponseBuilder rb)
Called after all responses have been received for this stage.
|
SolrInfoBean.Category |
getCategory()
Category of this component
|
protected SolrParams |
getCustomParams(String dictionary,
SolrParams params)
For every param that is of the form "spellcheck.[dictionary name].XXXX=YYYY, add
XXXX=YYYY as a param to the custom param list
|
String |
getDescription()
Simple one or two line description
|
protected SolrSpellChecker |
getSpellChecker(SolrParams params) |
SolrSpellChecker |
getSpellChecker(String name) |
Map<String,SolrSpellChecker> |
getSpellCheckers() |
void |
inform(SolrCore core) |
void |
init(NamedList args) |
void |
modifyRequest(ResponseBuilder rb,
SearchComponent who,
ShardRequest sreq)
Called after another component adds a request
|
void |
prepare(ResponseBuilder rb)
Prepare the response.
|
void |
process(ResponseBuilder rb)
Process the request for this component
|
protected NamedList |
toNamedList(boolean shardRequest,
SpellingResult spellingResult,
String origQuery,
boolean extendedResults) |
distributedProcess, getMetricNames, getMetricRegistry, getName, handleResponses, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetricsSnapshot, registerMetricNamepublic static final boolean DEFAULT_ONLY_MORE_POPULAR
public static final String COMPONENT_NAME
protected NamedList initParams
protected Map<String,SolrSpellChecker> spellCheckers
protected QueryConverter queryConverter
public void init(NamedList args)
init in interface NamedListInitializedPlugininit in class SearchComponentpublic void prepare(ResponseBuilder rb) throws IOException
SearchComponentSearchComponent.process(org.apache.solr.handler.component.ResponseBuilder) method.
Called for every incoming request.
The place to do initialization that is request dependent.prepare in class SearchComponentrb - The ResponseBuilderIOException - If there is a low-level I/O error.public void process(ResponseBuilder rb) throws IOException
SearchComponentprocess in class SearchComponentrb - The ResponseBuilderIOException - If there is a low-level I/O error.protected void addCollationsToResponse(SolrParams params, SpellingResult spellingResult, ResponseBuilder rb, String q, NamedList response, boolean suggestionsMayOverlap)
protected SolrParams getCustomParams(String dictionary, SolrParams params)
params - The original SolrParamspublic void modifyRequest(ResponseBuilder rb, SearchComponent who, ShardRequest sreq)
SearchComponentmodifyRequest in class SearchComponentpublic void finishStage(ResponseBuilder rb)
SearchComponentfinishStage in class SearchComponentprotected SolrSpellChecker getSpellChecker(SolrParams params)
public SolrSpellChecker getSpellChecker(String name)
protected NamedList toNamedList(boolean shardRequest, SpellingResult spellingResult, String origQuery, boolean extendedResults)
public void inform(SolrCore core)
inform in interface SolrCoreAwarepublic Map<String,SolrSpellChecker> getSpellCheckers()
public String getDescription()
SolrInfoBeangetDescription in interface SolrInfoBeangetDescription in class SearchComponentpublic SolrInfoBean.Category getCategory()
SolrInfoBeangetCategory in interface SolrInfoBeangetCategory in class SearchComponentCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.