org.apache.solr.handler.clustering.carrot2
Class CarrotClusteringEngine

java.lang.Object
  extended by org.apache.solr.handler.clustering.ClusteringEngine
      extended by org.apache.solr.handler.clustering.SearchClusteringEngine
          extended by org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine

public class CarrotClusteringEngine
extends SearchClusteringEngine

Search results clustering engine based on Carrot2 clustering algorithms.

See Also:
"http://project.carrot2.org"
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
 
Fields inherited from class org.apache.solr.handler.clustering.ClusteringEngine
DEFAULT_ENGINE_NAME, ENGINE_NAME
 
Constructor Summary
CarrotClusteringEngine()
           
 
Method Summary
 Object cluster(Query query, SolrDocumentList solrDocList, Map<SolrDocument,Integer> docIds, SolrQueryRequest sreq)
          Do the clustering, return a clusters structure to be appended to SolrQueryResponse.
protected  Set<String> getFieldsToLoad(SolrQueryRequest sreq)
          Returns the set of field names to load.
 String init(NamedList config, SolrCore core)
           
 
Methods inherited from class org.apache.solr.handler.clustering.ClusteringEngine
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CarrotClusteringEngine

public CarrotClusteringEngine()
Method Detail

init

public String init(NamedList config,
                   SolrCore core)
Overrides:
init in class ClusteringEngine

cluster

public Object cluster(Query query,
                      SolrDocumentList solrDocList,
                      Map<SolrDocument,Integer> docIds,
                      SolrQueryRequest sreq)
Description copied from class: SearchClusteringEngine
Do the clustering, return a clusters structure to be appended to SolrQueryResponse.

Specified by:
cluster in class SearchClusteringEngine

getFieldsToLoad

protected Set<String> getFieldsToLoad(SolrQueryRequest sreq)
Description copied from class: SearchClusteringEngine
Returns the set of field names to load. Concrete classes can override this method if needed. Default implementation returns null, that is, all stored fields are loaded.

Overrides:
getFieldsToLoad in class SearchClusteringEngine
Returns:
The set of field names to load.


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.