lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject lucene-solr:master: SOLR-9660: rename GroupSpecification's sortSpecWithinGroup to withinGroupSortSpec (Judith Silverman via Christine Poerschke)
Date Fri, 23 Dec 2016 17:18:31 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master f62874e47 -> bc8936a56


SOLR-9660: rename GroupSpecification's sortSpecWithinGroup to withinGroupSortSpec (Judith
Silverman via Christine Poerschke)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/bc8936a5
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/bc8936a5
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/bc8936a5

Branch: refs/heads/master
Commit: bc8936a567e40eef3b70665fd8838548350c9aaa
Parents: f62874e
Author: Christine Poerschke <cpoerschke@apache.org>
Authored: Fri Dec 23 16:01:05 2016 +0000
Committer: Christine Poerschke <cpoerschke@apache.org>
Committed: Fri Dec 23 16:01:05 2016 +0000

----------------------------------------------------------------------
 .../solr/handler/component/QueryComponent.java    | 18 +++++++++---------
 .../component/QueryElevationComponent.java        |  4 ++--
 .../search/grouping/GroupingSpecification.java    | 18 +++++++++---------
 3 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc8936a5/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index 84ade43..9bd5efb 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -255,23 +255,23 @@ public class QueryComponent extends SearchComponent
     final SortSpec groupSortSpec = searcher.weightSortSpec(sortSpec, Sort.RELEVANCE);
 
     // groupSort defaults to sort
-    String sortWithinGroupStr = params.get(GroupParams.GROUP_SORT);
+    String withinGroupSortStr = params.get(GroupParams.GROUP_SORT);
     //TODO: move weighting of sort
-    final SortSpec sortSpecWithinGroup;
-    if (sortWithinGroupStr != null) {
-      SortSpec parsedSortSpecWithinGroup = SortSpecParsing.parseSortSpec(sortWithinGroupStr,
req);
-      sortSpecWithinGroup = searcher.weightSortSpec(parsedSortSpecWithinGroup, Sort.RELEVANCE);
+    final SortSpec withinGroupSortSpec;
+    if (withinGroupSortStr != null) {
+      SortSpec parsedWithinGroupSortSpec = SortSpecParsing.parseSortSpec(withinGroupSortStr,
req);
+      withinGroupSortSpec = searcher.weightSortSpec(parsedWithinGroupSortSpec, Sort.RELEVANCE);
     } else {
-      sortSpecWithinGroup = new SortSpec(
+      withinGroupSortSpec = new SortSpec(
           groupSortSpec.getSort(),
           groupSortSpec.getSchemaFields(),
           groupSortSpec.getCount(),
           groupSortSpec.getOffset());
     }
-    sortSpecWithinGroup.setOffset(params.getInt(GroupParams.GROUP_OFFSET, 0));
-    sortSpecWithinGroup.setCount(params.getInt(GroupParams.GROUP_LIMIT, 1));
+    withinGroupSortSpec.setOffset(params.getInt(GroupParams.GROUP_OFFSET, 0));
+    withinGroupSortSpec.setCount(params.getInt(GroupParams.GROUP_LIMIT, 1));
 
-    groupingSpec.setSortSpecWithinGroup(sortSpecWithinGroup);
+    groupingSpec.setWithinGroupSortSpec(withinGroupSortSpec);
     groupingSpec.setGroupSortSpec(groupSortSpec);
 
     String formatStr = params.get(GroupParams.GROUP_FORMAT, Grouping.Format.grouped.name());

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc8936a5/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
b/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
index f72fc89..25157cf 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
@@ -465,10 +465,10 @@ public class QueryElevationComponent extends SearchComponent implements
SolrCore
         if (modGroupSortSpec != null) {
           groupingSpec.setGroupSortSpec(modGroupSortSpec);
         }
-        SortSpec withinGroupSortSpec = groupingSpec.getSortSpecWithinGroup();
+        SortSpec withinGroupSortSpec = groupingSpec.getWithinGroupSortSpec();
         SortSpec modWithinGroupSortSpec = this.modifySortSpec(withinGroupSortSpec, force,
comparator);
         if (modWithinGroupSortSpec != null) {
-          groupingSpec.setSortSpecWithinGroup(modWithinGroupSortSpec);
+          groupingSpec.setWithinGroupSortSpec(modWithinGroupSortSpec);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc8936a5/solr/core/src/java/org/apache/solr/search/grouping/GroupingSpecification.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/GroupingSpecification.java
b/solr/core/src/java/org/apache/solr/search/grouping/GroupingSpecification.java
index 4194dd0..e1e276e 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/GroupingSpecification.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/GroupingSpecification.java
@@ -31,7 +31,7 @@ public class GroupingSpecification {
   private String[] queries = new String[]{};
   private String[] functions = new String[]{};
   private SortSpec groupSortSpec;
-  private SortSpec sortSpecWithinGroup;
+  private SortSpec withinGroupSortSpec;
   private boolean includeGroupCount;
   private boolean main;
   private Grouping.Format responseFormat;
@@ -76,7 +76,7 @@ public class GroupingSpecification {
 
   @Deprecated
   public int getWithinGroupOffset() {
-    return sortSpecWithinGroup.getOffset();
+    return withinGroupSortSpec.getOffset();
   }
   @Deprecated
   public int getGroupOffset() {
@@ -86,8 +86,9 @@ public class GroupingSpecification {
 
   @Deprecated
   public int getWithinGroupLimit() {
-    return sortSpecWithinGroup.getCount();
+    return withinGroupSortSpec.getCount();
   }
+
   @Deprecated
   public int getGroupLimit() {
     return getWithinGroupLimit();
@@ -114,10 +115,9 @@ public class GroupingSpecification {
 
   @Deprecated
   public Sort getSortWithinGroup() {
-    return sortSpecWithinGroup.getSort();
+    return withinGroupSortSpec.getSort();
   }
 
-
   public boolean isIncludeGroupCount() {
     return includeGroupCount;
   }
@@ -166,12 +166,12 @@ public class GroupingSpecification {
     this.groupSortSpec = groupSortSpec;
   }
 
-  public SortSpec getSortSpecWithinGroup() {
-    return sortSpecWithinGroup;
+  public SortSpec getWithinGroupSortSpec() {
+    return withinGroupSortSpec;
   }
 
-  public void setSortSpecWithinGroup(SortSpec sortSpecWithinGroup) {
-    this.sortSpecWithinGroup = sortSpecWithinGroup;
+  public void setWithinGroupSortSpec(SortSpec withinGroupSortSpec) {
+    this.withinGroupSortSpec = withinGroupSortSpec;
   }
 
 }


Mime
View raw message