docList.maxScore());
DocIterator iterator = docList.iterator();
if (responseWriter.isStreamingDocs()) {
responseWriter.startDocumentList(name,info);
for (int j = 0; j < sz; j++) {
SolrDocument sdoc = getDoc(iterator.nextDoc(), idxInfo);
if (idxInfo.includeScore && docList.hasScores()) {
sdoc.addField(SCORE_FIELD, iterator.score());
}
responseWriter.writeDoc(sdoc);
}
} else {
ArrayList<SolrDocument> list = new ArrayList<SolrDocument>(docList
.size());
for (int j = 0; j < sz; j++) {
SolrDocument sdoc = getDoc(iterator.nextDoc(), idxInfo);
if (idxInfo.includeScore && docList.hasScores()) {
sdoc.addField(SCORE_FIELD, iterator.score());
}
list.add(sdoc);
}
responseWriter.writeAllDocs(info, list);
}