mirror of https://github.com/apache/lucene.git
SOLR-8114: in Grouping.java rename sort to groupSort
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1709288 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0acf3d9da8
commit
c1ec5f5ec7
|
@ -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 ==================
|
||||
|
||||
|
|
|
@ -460,7 +460,7 @@ public class QueryComponent extends SearchComponent
|
|||
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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue