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 08:21:17 UTC
svn commit: r1709239 - 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/request/
solr/core/src/java/org/apache/solr/search/
Author: cpoerschke
Date: Sun Oct 18 06:21:17 2015
New Revision: 1709239
URL: http://svn.apache.org/viewvc?rev=1709239&view=rev
Log:
SOLR-8114: in Grouping.java rename groupSort to withinGroupSort (merge in revision 1709230 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/request/SimpleFacets.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=1709239&r1=1709238&r2=1709239&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Sun Oct 18 06:21:17 2015
@@ -9,6 +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)
+
================== 5.4.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
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=1709239&r1=1709238&r2=1709239&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 06:21:17 2015
@@ -463,7 +463,7 @@ public class QueryComponent extends Sear
Grouping grouping =
new Grouping(searcher, result, cmd, cacheSecondPassSearch, maxDocsPercentageToCache, groupingSpec.isMain());
grouping.setSort(groupingSpec.getGroupSort())
- .setGroupSort(groupingSpec.getSortWithinGroup())
+ .setWithinGroupSort(groupingSpec.getSortWithinGroup())
.setDefaultFormat(groupingSpec.getResponseFormat())
.setLimitDefault(limitDefault)
.setDefaultTotalCount(defaultTotalCount)
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/request/SimpleFacets.java?rev=1709239&r1=1709238&r2=1709239&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/request/SimpleFacets.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/request/SimpleFacets.java Sun Oct 18 06:21:17 2015
@@ -270,7 +270,7 @@ public class SimpleFacets {
DocSet base = searcher.getDocSet(qlist);
if (rb.grouping() && rb.getGroupingSpec().isTruncateGroups()) {
Grouping grouping = new Grouping(searcher, null, rb.getQueryCommand(), false, 0, false);
- grouping.setGroupSort(rb.getGroupingSpec().getSortWithinGroup());
+ grouping.setWithinGroupSort(rb.getGroupingSpec().getSortWithinGroup());
if (rb.getGroupingSpec().getFields().length > 0) {
grouping.addFieldCommand(rb.getGroupingSpec().getFields()[0], req);
} else if (rb.getGroupingSpec().getFunctions().length > 0) {
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=1709239&r1=1709238&r2=1709239&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 06:21:17 2015
@@ -91,7 +91,7 @@ public class Grouping {
private final int maxDocsPercentageToCache;
private Sort sort;
- private Sort groupSort;
+ private Sort withinGroupSort;
private int limitDefault;
private int docsPerGroupDefault;
private int groupOffsetDefault;
@@ -158,7 +158,7 @@ public class Grouping {
}
Grouping.CommandField gc = new CommandField();
- gc.groupSort = groupSort;
+ gc.withinGroupSort = withinGroupSort;
gc.groupBy = field;
gc.key = field;
gc.numGroups = limitDefault;
@@ -201,7 +201,7 @@ public class Grouping {
commandFunc.groupBy = new QueryValueSource(q, 0.0f);
gc = commandFunc;
}
- gc.groupSort = groupSort;
+ gc.withinGroupSort = withinGroupSort;
gc.key = groupByStr;
gc.numGroups = limitDefault;
gc.docsPerGroup = docsPerGroupDefault;
@@ -228,7 +228,7 @@ public class Grouping {
Query gq = parser.getQuery();
Grouping.CommandQuery gc = new CommandQuery();
gc.query = gq;
- gc.groupSort = groupSort;
+ gc.withinGroupSort = withinGroupSort;
gc.key = groupByStr;
gc.numGroups = limitDefault;
gc.docsPerGroup = docsPerGroupDefault;
@@ -256,8 +256,8 @@ public class Grouping {
return this;
}
- public Grouping setGroupSort(Sort groupSort) {
- this.groupSort = groupSort;
+ public Grouping setWithinGroupSort(Sort withinGroupSort) {
+ this.withinGroupSort = withinGroupSort;
return this;
}
@@ -309,12 +309,12 @@ public class Grouping {
needScores = (cmd.getFlags() & SolrIndexSearcher.GET_SCORES) != 0;
boolean cacheScores = false;
- // NOTE: Change this when groupSort can be specified per group
+ // NOTE: Change this when withinGroupSort can be specified per group
if (!needScores && !commands.isEmpty()) {
- if (commands.get(0).groupSort == null) {
+ if (commands.get(0).withinGroupSort == null) {
cacheScores = true;
} else {
- for (SortField field : commands.get(0).groupSort.getSort()) {
+ for (SortField field : commands.get(0).withinGroupSort.getSort()) {
if (field.getType() == SortField.Type.SCORE) {
cacheScores = true;
break;
@@ -522,7 +522,7 @@ public class Grouping {
public abstract class Command<GROUP_VALUE_TYPE> {
public String key; // the name to use for this group in the response
- public Sort groupSort; // the sort of the documents *within* a single group.
+ public Sort withinGroupSort; // the sort of the documents *within* a single group.
public Sort sort; // 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)
@@ -757,7 +757,7 @@ public class Grouping {
int groupedDocsToCollect = getMax(groupOffset, docsPerGroup, maxDoc);
groupedDocsToCollect = Math.max(groupedDocsToCollect, 1);
secondPass = new TermSecondPassGroupingCollector(
- groupBy, topGroups, sort, groupSort, groupedDocsToCollect, needScores, needScores, false
+ groupBy, topGroups, sort, withinGroupSort, groupedDocsToCollect, needScores, needScores, false
);
if (totalCount == TotalCount.grouped) {
@@ -773,7 +773,7 @@ public class Grouping {
*/
@Override
public AbstractAllGroupHeadsCollector<?> createAllGroupCollector() throws IOException {
- Sort sortWithinGroup = groupSort != null ? groupSort : new Sort();
+ Sort sortWithinGroup = withinGroupSort != null ? withinGroupSort : new Sort();
return TermAllGroupHeadsCollector.create(groupBy, sortWithinGroup);
}
@@ -872,7 +872,7 @@ public class Grouping {
@Override
protected Collector createFirstPassCollector() throws IOException {
DocSet groupFilt = searcher.getDocSet(query);
- topCollector = newCollector(groupSort, needScores);
+ topCollector = newCollector(withinGroupSort, needScores);
collector = new FilterCollector(groupFilt, topCollector);
return collector;
}
@@ -977,7 +977,7 @@ public class Grouping {
int groupdDocsToCollect = getMax(groupOffset, docsPerGroup, maxDoc);
groupdDocsToCollect = Math.max(groupdDocsToCollect, 1);
secondPass = new FunctionSecondPassGroupingCollector(
- topGroups, sort, groupSort, groupdDocsToCollect, needScores, needScores, false, groupBy, context
+ topGroups, sort, withinGroupSort, groupdDocsToCollect, needScores, needScores, false, groupBy, context
);
if (totalCount == TotalCount.grouped) {
@@ -990,7 +990,7 @@ public class Grouping {
@Override
public AbstractAllGroupHeadsCollector<?> createAllGroupCollector() throws IOException {
- Sort sortWithinGroup = groupSort != null ? groupSort : new Sort();
+ Sort sortWithinGroup = withinGroupSort != null ? withinGroupSort : new Sort();
return new FunctionAllGroupHeadsCollector(groupBy, context, sortWithinGroup);
}