git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@893576 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Grant Ingersoll 2009-12-23 17:01:42 +00:00
parent 9881179cae
commit d4b35b513a
2 changed files with 6 additions and 3 deletions

View File

@ -8,6 +8,10 @@ CHANGES
$Id:$ $Id:$
================== Release 1.5-dev ==================
* SOLR-1684: Switch to use the SolrIndexSearcher.doc(int, Set<String>) method b/c it can use the document cache (gsingers)
================== Release 1.4.0 ================== ================== Release 1.4.0 ==================
Solr Clustering will be released for the first time in Solr 1.4. See http://wiki.apache.org/solr/ClusteringComponent Solr Clustering will be released for the first time in Solr 1.4. See http://wiki.apache.org/solr/ClusteringComponent

View File

@ -152,8 +152,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
SolrIndexSearcher searcher = sreq.getSearcher(); SolrIndexSearcher searcher = sreq.getSearcher();
List<Document> result = new ArrayList<Document>(docList.size()); List<Document> result = new ArrayList<Document>(docList.size());
FieldSelector fieldSelector = new SetBasedFieldSelector(fieldsToLoad,
Collections.emptySet());
float[] scores = {1.0f}; float[] scores = {1.0f};
int[] docsHolder = new int[1]; int[] docsHolder = new int[1];
Query theQuery = query; Query theQuery = query;
@ -161,7 +160,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
while (docsIter.hasNext()) { while (docsIter.hasNext()) {
Integer id = docsIter.next(); Integer id = docsIter.next();
org.apache.lucene.document.Document doc = searcher.doc(id, org.apache.lucene.document.Document doc = searcher.doc(id,
fieldSelector); fieldsToLoad);
String snippet = getValue(doc, snippetField); String snippet = getValue(doc, snippetField);
if (produceSummary == true) { if (produceSummary == true) {
docsHolder[0] = id.intValue(); docsHolder[0] = id.intValue();