LUCENE-6768: AbstractFirstPassGroupingCollector.groupSort private member is not needed.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1698418 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christine Poerschke 2015-08-28 21:16:38 +00:00
parent b3b4a5be68
commit 7653c36bfa
2 changed files with 4 additions and 3 deletions

View File

@ -105,6 +105,9 @@ Other
* LUCENE-6571: fix some private access level javadoc errors and warnings * LUCENE-6571: fix some private access level javadoc errors and warnings
(Cao Manh Dat, Christine Poerschke) (Cao Manh Dat, Christine Poerschke)
* LUCENE-6768: AbstractFirstPassGroupingCollector.groupSort private member
is not needed. (Christine Poerschke)
Build Build
* LUCENE-6732: Improve checker for invalid source patterns to also * LUCENE-6732: Improve checker for invalid source patterns to also

View File

@ -35,7 +35,6 @@ import java.util.*;
*/ */
abstract public class AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE> extends SimpleCollector { abstract public class AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE> extends SimpleCollector {
private final Sort groupSort;
private final FieldComparator<?>[] comparators; private final FieldComparator<?>[] comparators;
private final LeafFieldComparator[] leafComparators; private final LeafFieldComparator[] leafComparators;
private final int[] reversed; private final int[] reversed;
@ -69,7 +68,6 @@ abstract public class AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE> exten
// TODO: allow null groupSort to mean "by relevance", // TODO: allow null groupSort to mean "by relevance",
// and specialize it? // and specialize it?
this.groupSort = groupSort;
this.topNGroups = topNGroups; this.topNGroups = topNGroups;
@ -117,7 +115,7 @@ abstract public class AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE> exten
final Collection<SearchGroup<GROUP_VALUE_TYPE>> result = new ArrayList<>(); final Collection<SearchGroup<GROUP_VALUE_TYPE>> result = new ArrayList<>();
int upto = 0; int upto = 0;
final int sortFieldCount = groupSort.getSort().length; final int sortFieldCount = comparators.length;
for(CollectedSearchGroup<GROUP_VALUE_TYPE> group : orderedGroups) { for(CollectedSearchGroup<GROUP_VALUE_TYPE> group : orderedGroups) {
if (upto++ < groupOffset) { if (upto++ < groupOffset) {
continue; continue;