data.getManager().release(reference);
}
}
private List<Hit> clusterTopDocsResponse(QueryData q, Collectors collectors, Map<String, Long> times, IndexReader indexReader, ClusterConfig clusterConfig) throws Exception {
int totalHits = collectors.topCollector.getTotalHits();
<BUG>List<LuceneResponse.Hit> hits = new ArrayList<>();
double epsilon = interpolateEpsilon(totalHits, q.stop - q.start, clusterConfig);
MerescoClusterer clusterer = new MerescoClusterer(indexReader, epsilon, clusterConfig.clusteringMinPoints);
for (ClusterConfig.ClusterField clusterField : clusterConfig.clusterFields)
clusterer.registerField(clusterField.fieldname, clusterField.weight, clusterField.filterValue);
TopDocs topDocs = collectors.topCollector.topDocs(q.start);
long t0 = System.currentTimeMillis();</BUG>
clusterer.processTopDocs(topDocs);

data.getManager().release(reference);
}
}
private List<Hit> clusterTopDocsResponse(QueryData q, Collectors collectors, Map<String, Long> times, IndexReader indexReader, ClusterConfig clusterConfig) throws Exception {
int totalHits = collectors.topCollector.getTotalHits();
TopDocs topDocs = collectors.topCollector.topDocs(q.start);
MerescoClusterer clusterer = new MerescoClusterer(indexReader, clusterConfig, this.getSettings().epsilonInterpolator, totalHits, q.stop - q.start);
long t0 = System.currentTimeMillis();
clusterer.processTopDocs(topDocs);
