mirror of https://github.com/apache/lucene.git
SOLR-5230: Call DelegatingCollector.finish() during grouping
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1562305 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d593f195ba
commit
7a648bf7db
|
@ -234,6 +234,10 @@ Bug Fixes
|
|||
|
||||
* SOLR-5666: Using the hdfs write cache can result in appearance of corrupted
|
||||
index. (Mark Miller)
|
||||
|
||||
* SOLR-5230: Call DelegatingCollector.finish() during grouping.
|
||||
(Joel Bernstein, ehatcher)
|
||||
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
|
|
@ -346,6 +346,10 @@ public class Grouping {
|
|||
|
||||
if (allCollectors != null) {
|
||||
searchWithTimeLimiter(luceneFilter, allCollectors);
|
||||
|
||||
if(allCollectors instanceof DelegatingCollector) {
|
||||
((DelegatingCollector) allCollectors).finish();
|
||||
}
|
||||
}
|
||||
|
||||
if (getGroupedDocSet && allGroupHeadsCollector != null) {
|
||||
|
@ -382,6 +386,10 @@ public class Grouping {
|
|||
secondPhaseCollectors = pf.postFilter;
|
||||
}
|
||||
searchWithTimeLimiter(luceneFilter, secondPhaseCollectors);
|
||||
|
||||
if(secondPhaseCollectors instanceof DelegatingCollector) {
|
||||
((DelegatingCollector) secondPhaseCollectors).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,5 +286,13 @@ public class TestCollapseQParserPlugin extends SolrTestCaseJ4 {
|
|||
params.add("facet.mincount", "1");
|
||||
assertQ(req(params), "*[count(//doc)=1]", "*[count(//lst[@name='facet_fields']/lst[@name='test_ti']/int)=2]");
|
||||
|
||||
// SOLR-5230 - ensure CollapsingFieldValueCollector.finish() is called
|
||||
params = new ModifiableSolrParams();
|
||||
params.add("q", "*:*");
|
||||
params.add("fq", "{!collapse field=group_s}");
|
||||
params.add("group", "true");
|
||||
params.add("group.field", "id");
|
||||
assertQ(req(params), "*[count(//doc)=2]");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue