diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 3dab675aee7..0c057e6b9c7 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -105,6 +105,9 @@ Other * LUCENE-6571: fix some private access level javadoc errors and warnings (Cao Manh Dat, Christine Poerschke) +* LUCENE-6768: AbstractFirstPassGroupingCollector.groupSort private member + is not needed. (Christine Poerschke) + Build * LUCENE-6732: Improve checker for invalid source patterns to also diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java index ad5194220bb..6e5b2b5ef26 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractFirstPassGroupingCollector.java @@ -35,7 +35,6 @@ import java.util.*; */ abstract public class AbstractFirstPassGroupingCollector extends SimpleCollector { - private final Sort groupSort; private final FieldComparator[] comparators; private final LeafFieldComparator[] leafComparators; private final int[] reversed; @@ -69,7 +68,6 @@ abstract public class AbstractFirstPassGroupingCollector exten // TODO: allow null groupSort to mean "by relevance", // and specialize it? - this.groupSort = groupSort; this.topNGroups = topNGroups; @@ -117,7 +115,7 @@ abstract public class AbstractFirstPassGroupingCollector exten final Collection> result = new ArrayList<>(); int upto = 0; - final int sortFieldCount = groupSort.getSort().length; + final int sortFieldCount = comparators.length; for(CollectedSearchGroup group : orderedGroups) { if (upto++ < groupOffset) { continue;