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 2016/12/23 17:40:58 UTC
lucene-solr:branch_6x: SOLR-9660: rename GroupSpecification's
sortSpecWithinGroup to withinGroupSortSpec (Judith Silverman via Christine
Poerschke)
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x b7c75a3a1 -> 038d4514a
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/038d4514
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/038d4514
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/038d4514
Branch: refs/heads/branch_6x
Commit: 038d4514a787d4137c59322dd38218eaa5be291a
Parents: b7c75a3
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Dec 23 16:01:05 2016 +0000
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Dec 23 17:20:41 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/038d4514/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 7bdf799..a3e226e 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
@@ -256,23 +256,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/038d4514/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 c79db9b..5e212db 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
@@ -466,10 +466,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/038d4514/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;
}
}