Class ClusteringComponent
- java.lang.Object
-
- org.apache.solr.handler.component.SearchComponent
-
- org.apache.solr.handler.clustering.ClusteringComponent
-
- All Implemented Interfaces:
AutoCloseable,SolrInfoBean,SolrMetricProducer,NamedListInitializedPlugin,SolrCoreAware
public class ClusteringComponent extends SearchComponent implements SolrCoreAware
ASearchComponentfor dynamic, unsupervised grouping of search results based on the content of their text fields or contextual snippets around query-matching regions.The default implementation uses clustering algorithms from the Carrot2 project.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENT_NAMEDefault component name and parameter prefix.static StringINIT_SECTION_ENGINEEngine configuration initialization block name.static StringREQUEST_PARAM_ENGINERequest parameter that selects one of theEngineconfigurations out of many possibly defined in the component's initialization parameters.static StringRESPONSE_SECTION_CLUSTERSResponse section name containing output clusters.-
Fields inherited from class org.apache.solr.handler.component.SearchComponent
solrMetricsContext, standard_components
-
-
Constructor Summary
Constructors Constructor Description ClusteringComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinishStage(ResponseBuilder rb)StringgetDescription()voidinform(SolrCore core)voidinit(org.apache.solr.common.util.NamedList<?> args)voidmodifyRequest(ResponseBuilder rb, SearchComponent who, ShardRequest sreq)voidprepare(ResponseBuilder rb)voidprocess(ResponseBuilder rb)Entry point for clustering in local server mode (non-distributed).-
Methods inherited from class org.apache.solr.handler.component.SearchComponent
distributedProcess, getCategory, getName, getSolrMetricsContext, handleResponses, initializeMetrics, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close
-
-
-
-
Field Detail
-
COMPONENT_NAME
public static final String COMPONENT_NAME
Default component name and parameter prefix.- See Also:
- Constant Field Values
-
REQUEST_PARAM_ENGINE
public static final String REQUEST_PARAM_ENGINE
Request parameter that selects one of theEngineconfigurations out of many possibly defined in the component's initialization parameters.- See Also:
- Constant Field Values
-
INIT_SECTION_ENGINE
public static final String INIT_SECTION_ENGINE
Engine configuration initialization block name.- See Also:
- Constant Field Values
-
RESPONSE_SECTION_CLUSTERS
public static final String RESPONSE_SECTION_CLUSTERS
Response section name containing output clusters.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
- Specified by:
initin interfaceNamedListInitializedPlugin
-
inform
public void inform(SolrCore core)
- Specified by:
informin interfaceSolrCoreAware
-
prepare
public void prepare(ResponseBuilder rb)
- Specified by:
preparein classSearchComponent
-
process
public void process(ResponseBuilder rb) throws IOException
Entry point for clustering in local server mode (non-distributed).- Specified by:
processin classSearchComponent- Parameters:
rb- TheResponseBuilder.- Throws:
IOException- Propagated if an I/O exception occurs.
-
modifyRequest
public void modifyRequest(ResponseBuilder rb, SearchComponent who, ShardRequest sreq)
- Overrides:
modifyRequestin classSearchComponent
-
finishStage
public void finishStage(ResponseBuilder rb)
- Overrides:
finishStagein classSearchComponent
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceSolrInfoBean- Specified by:
getDescriptionin classSearchComponent
-
-