From e7e5216382a4988cba47df95ab7b2a5f9a27c695 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Tue, 4 Jul 2017 18:33:38 +0200 Subject: [PATCH] Make totalHits a long in CollapseTopFieldDocs. Relates to #25349. --- .../apache/lucene/search/grouping/CollapseTopFieldDocs.java | 4 ++-- .../src/main/java/org/elasticsearch/common/lucene/Lucene.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/apache/lucene/search/grouping/CollapseTopFieldDocs.java b/core/src/main/java/org/apache/lucene/search/grouping/CollapseTopFieldDocs.java index b4d3c823439..c5362cbf858 100644 --- a/core/src/main/java/org/apache/lucene/search/grouping/CollapseTopFieldDocs.java +++ b/core/src/main/java/org/apache/lucene/search/grouping/CollapseTopFieldDocs.java @@ -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 queue = new MergeSortQueue(sort, shardHits); - int totalHitCount = 0; + long totalHitCount = 0; int availHitCount = 0; float maxScore = Float.MIN_VALUE; for(int shardIDX=0;shardIDX