for(ScoreDoc sd : shardGroupDocs.scoreDocs) {
System.out.println(" doc=" + sd.doc);
}
*/
shardTopDocs[shardIDX] = new TopDocs(shardGroupDocs.totalHits,
shardGroupDocs.scoreDocs,
shardGroupDocs.maxScore,
shardGroupDocs.sum,
shardGroupDocs.max,
shardGroupDocs.min);
maxScore = Math.max(maxScore, shardGroupDocs.maxScore);
sum += shardGroupDocs.sum;
max = Math.max(max, shardGroupDocs.max);
min = Math.min(min, shardGroupDocs.min);
totalHits += shardGroupDocs.totalHits;
}
final TopDocs mergedTopDocs = TopDocs.merge(docSort, docOffset + docTopN, shardTopDocs);
// Slice;
final ScoreDoc[] mergedScoreDocs;
if (docOffset == 0) {
mergedScoreDocs = mergedTopDocs.scoreDocs;