lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r1562305 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/search/Grouping.java core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
Date Tue, 28 Jan 2014 23:07:25 GMT
Author: ehatcher
Date: Tue Jan 28 23:07:25 2014
New Revision: 1562305

URL: http://svn.apache.org/r1562305
Log:
SOLR-5230: Call DelegatingCollector.finish() during grouping

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1562305&r1=1562304&r2=1562305&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Tue Jan 28 23:07:25 2014
@@ -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
 ----------------------

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java?rev=1562305&r1=1562304&r2=1562305&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/Grouping.java Tue Jan 28 23:07:25
2014
@@ -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();
+          }
         }
       }
     }

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java?rev=1562305&r1=1562304&r2=1562305&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
(original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
Tue Jan 28 23:07:25 2014
@@ -286,5 +286,13 @@ public class TestCollapseQParserPlugin e
     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]");
+
   }
 }



Mime
View raw message