Apache Lucene open-source search software
SOLR-6886: Removed redundant size check and added missing calls to DelegatingCollection.finish inside Grouping code
Shalin Shekhar Mangarf258d2f9d4dc
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 94c313a8664..1e86a4cbb5b 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -157,6 +157,9 @@ Other Changes- When using hl.maxMultiValuedToMatch with hl.preserveMulti, only count matched snippets.(David Smiley)+* SOLR-6886: Removed redundant size check and added missing calls to+ DelegatingCollection.finish inside Grouping code. (Christine Poerschke via shalin)+================== 5.1.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this releasediff --git a/solr/core/src/java/org/apache/solr/search/Grouping.java b/solr/core/src/java/org/apache/solr/search/Grouping.javaindex 087bcca2dd1..60dfc22675e 100644--- a/solr/core/src/java/org/apache/solr/search/Grouping.java+++ b/solr/core/src/java/org/apache/solr/search/Grouping.java@@ -405,10 +405,9 @@ public class Grouping {secondPhaseCollectors = pf.postFilter;}searchWithTimeLimiter(luceneFilter, secondPhaseCollectors);-- if(secondPhaseCollectors instanceof DelegatingCollector) {- ((DelegatingCollector) secondPhaseCollectors).finish();- }+ }+ if (secondPhaseCollectors instanceof DelegatingCollector) {+ ((DelegatingCollector) secondPhaseCollectors).finish();}}}