Make totalHits a long in CollapseTopFieldDocs.

Relates to #25349.
This commit is contained in:
Adrien Grand 2017-07-04 18:33:38 +02:00
parent c52c3cea68
commit e7e5216382
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ public final class CollapseTopFieldDocs extends TopFieldDocs {
/** The collapse value for each top doc */
public final Object[] collapseValues;
public CollapseTopFieldDocs(String field, int totalHits, ScoreDoc[] scoreDocs,
public CollapseTopFieldDocs(String field, long totalHits, ScoreDoc[] scoreDocs,
SortField[] sortFields, Object[] values, float maxScore) {
super(totalHits, scoreDocs, sortFields, maxScore);
this.field = field;
@ -170,7 +170,7 @@ public final class CollapseTopFieldDocs extends TopFieldDocs {
}
final PriorityQueue<ShardRef> queue = new MergeSortQueue(sort, shardHits);
int totalHitCount = 0;
long totalHitCount = 0;
int availHitCount = 0;
float maxScore = Float.MIN_VALUE;
for(int shardIDX=0;shardIDX<shardHits.length;shardIDX++) {

View File

@ -295,7 +295,7 @@ public class Lucene {
}
return new TopFieldDocs(totalHits, fieldDocs, fields, maxScore);
} else if (type == 2) {
int totalHits = in.readVInt();
long totalHits = in.readVLong();
float maxScore = in.readFloat();
String field = in.readString();