You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2015/10/18 17:14:05 UTC
svn commit: r1709288 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/handler/component/QueryComponent.java
core/src/java/org/apache/solr/search/Grouping.java
Author: cpoerschke
Date: Sun Oct 18 15:14:05 2015
New Revision: 1709288
URL: http://svn.apache.org/viewvc?rev=1709288&view=rev
Log:
SOLR-8114: in Grouping.java rename sort to groupSort
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1709288&r1=1709287&r2=1709288&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sun Oct 18 15:14:05 2015
@@ -118,7 +118,8 @@ Other Changes
* SOLR-8132: HDFSDirectoryFactory now defaults to using the global block cache. (Mark Miller)
-* SOLR-8114: in Grouping.java rename groupSort to withinGroupSort (Christine Poerschke)
+* SOLR-8114: in Grouping.java rename groupSort and sort to withinGroupSort and groupSort
+ (Christine Poerschke)
================== 5.4.0 ==================
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java?rev=1709288&r1=1709287&r2=1709288&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java Sun Oct 18 15:14:05 2015
@@ -460,7 +460,7 @@ public class QueryComponent extends Sear
int limitDefault = cmd.getLen(); // this is normally from "rows"
Grouping grouping =
new Grouping(searcher, result, cmd, cacheSecondPassSearch, maxDocsPercentageToCache, groupingSpec.isMain());
- grouping.setSort(groupingSpec.getGroupSort())
+ grouping.setGroupSort(groupingSpec.getGroupSort())
.setWithinGroupSort(groupingSpec.getSortWithinGroup())
.setDefaultFormat(groupingSpec.getResponseFormat())
.setLimitDefault(limitDefault)
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java?rev=1709288&r1=1709287&r2=1709288&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java Sun Oct 18 15:14:05 2015
@@ -90,7 +90,7 @@ public class Grouping {
private final boolean cacheSecondPassSearch;
private final int maxDocsPercentageToCache;
- private Sort sort;
+ private Sort groupSort;
private Sort withinGroupSort;
private int limitDefault;
private int docsPerGroupDefault;
@@ -165,7 +165,7 @@ public class Grouping {
gc.docsPerGroup = docsPerGroupDefault;
gc.groupOffset = groupOffsetDefault;
gc.offset = cmd.getOffset();
- gc.sort = sort;
+ gc.groupSort = groupSort;
gc.format = defaultFormat;
gc.totalCount = defaultTotalCount;
@@ -207,7 +207,7 @@ public class Grouping {
gc.docsPerGroup = docsPerGroupDefault;
gc.groupOffset = groupOffsetDefault;
gc.offset = cmd.getOffset();
- gc.sort = sort;
+ gc.groupSort = groupSort;
gc.format = defaultFormat;
gc.totalCount = defaultTotalCount;
@@ -251,8 +251,8 @@ public class Grouping {
commands.add(gc);
}
- public Grouping setSort(Sort sort) {
- this.sort = sort;
+ public Grouping setGroupSort(Sort groupSort) {
+ this.groupSort = groupSort;
return this;
}
@@ -526,7 +526,7 @@ public class Grouping {
public String key; // the name to use for this group in the response
public Sort withinGroupSort; // the sort of the documents *within* a single group.
- public Sort sort; // the sort between groups
+ public Sort groupSort; // the sort between groups
public int docsPerGroup; // how many docs in each group - from "group.limit" param, default=1
public int groupOffset; // the offset within each group (for paging within each group)
public int numGroups; // how many groups - defaults to the "rows" parameter
@@ -730,8 +730,8 @@ public class Grouping {
return fallBackCollector;
}
- sort = sort == null ? Sort.RELEVANCE : sort;
- firstPass = new TermFirstPassGroupingCollector(groupBy, sort, actualGroupsToFind);
+ groupSort = groupSort == null ? Sort.RELEVANCE : groupSort;
+ firstPass = new TermFirstPassGroupingCollector(groupBy, groupSort, actualGroupsToFind);
return firstPass;
}
@@ -760,7 +760,7 @@ public class Grouping {
int groupedDocsToCollect = getMax(groupOffset, docsPerGroup, maxDoc);
groupedDocsToCollect = Math.max(groupedDocsToCollect, 1);
secondPass = new TermSecondPassGroupingCollector(
- groupBy, topGroups, sort, withinGroupSort, groupedDocsToCollect, needScores, needScores, false
+ groupBy, topGroups, groupSort, withinGroupSort, groupedDocsToCollect, needScores, needScores, false
);
if (totalCount == TotalCount.grouped) {
@@ -950,8 +950,8 @@ public class Grouping {
return fallBackCollector;
}
- sort = sort == null ? Sort.RELEVANCE : sort;
- firstPass = new FunctionFirstPassGroupingCollector(groupBy, context, searcher.weightSort(sort), actualGroupsToFind);
+ groupSort = groupSort == null ? Sort.RELEVANCE : groupSort;
+ firstPass = new FunctionFirstPassGroupingCollector(groupBy, context, searcher.weightSort(groupSort), actualGroupsToFind);
return firstPass;
}
@@ -980,7 +980,7 @@ public class Grouping {
int groupdDocsToCollect = getMax(groupOffset, docsPerGroup, maxDoc);
groupdDocsToCollect = Math.max(groupdDocsToCollect, 1);
secondPass = new FunctionSecondPassGroupingCollector(
- topGroups, sort, withinGroupSort, groupdDocsToCollect, needScores, needScores, false, groupBy, context
+ topGroups, groupSort, withinGroupSort, groupdDocsToCollect, needScores, needScores, false, groupBy, context
);
if (totalCount == TotalCount.grouped) {