SOLR-769: subcluster flattening

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@798205 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Grant Ingersoll 2009-07-27 16:26:06 +00:00
parent 04c116900f
commit 4a4fc9a5c9
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
SolrParams solrParams) {
List result = new ArrayList();
clustersToNamedList(carrotClusters, result, solrParams.getBool(
CarrotParams.OUTPUT_SUB_CLUSTERS, false), solrParams.getInt(
CarrotParams.OUTPUT_SUB_CLUSTERS, true), solrParams.getInt(
CarrotParams.NUM_DESCRIPTIONS, Integer.MAX_VALUE));
return result;
}
@ -210,7 +210,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
labels = labels.subList(0, maxLabels);
cluster.add("labels", labels);
List<Document> docs = outCluster.getDocuments();
List<Document> docs = outputSubClusters ? outCluster.getDocuments() : outCluster.getAllDocuments();
List docList = new ArrayList();
cluster.add("docs", docList);
for (Document doc : docs) {