gsmiller commented on code in PR #12853:
URL: https://github.com/apache/lucene/pull/12853#discussion_r1421103992


##########
lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java:
##########
@@ -193,42 +204,29 @@ public BulkScorer bulkScorer(LeafReaderContext context) 
throws IOException {
           FacetsCollector sidewaysCollector = 
drillSidewaysCollectorManagers[dim].newCollector();
           sidewaysCollectors[dim] = sidewaysCollector;
 
-          dims[dim] = new DrillSidewaysScorer.DocsAndCost(scorer, 
sidewaysCollector);
+          dims[dim] =
+              new DrillSidewaysScorer.DocsAndCost(
+                  scorer, sidewaysCollector.getLeafCollector(context));
         }
 
-        // If more than one dim has no matches, then there
-        // are no hits nor drill-sideways counts.  Or, if we
-        // have only one dim and that dim has no matches,
-        // same thing.

Review Comment:
   Yeah, they're not :). We _do_ need to still run the query in the case where 
there's a single dim but it's null because we need to collect all the 
"sideways" hits for that null dim. Looks like this comment (along with the 
commented out condition) came from @mikemccand back in 2014. I doubt he recalls 
much 9 years later. Maybe he realized this is a bug, commented out the 
condition (and replaced it with the correct one) and left the comment 
untouched? That's my best guess. But no need to keep the comment around anymore.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to