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/19 00:12:32 UTC

svn commit: r1709324 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/handler/component/ solr/core/src/java/org/apache/solr/search/

Author: cpoerschke
Date: Sun Oct 18 22:12:32 2015
New Revision: 1709324

URL: http://svn.apache.org/viewvc?rev=1709324&view=rev
Log:
SOLR-8114: in Grouping.java rename sort to groupSort (merge in revision 1709288 from trunk)

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1709324&r1=1709323&r2=1709324&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Sun Oct 18 22:12:32 2015
@@ -9,7 +9,8 @@ caching, replication, and a web administ
 See http://lucene.apache.org/solr for more information.
 
 
-* 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/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java?rev=1709324&r1=1709323&r2=1709324&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java Sun Oct 18 22:12:32 2015
@@ -462,7 +462,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/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java?rev=1709324&r1=1709323&r2=1709324&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/Grouping.java Sun Oct 18 22:12:32 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;
   }
 
@@ -523,7 +523,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
@@ -727,8 +727,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;
     }
 
@@ -757,7 +757,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) {
@@ -947,8 +947,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;
     }
 
@@ -977,7 +977,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) {