gsmiller commented on a change in pull request #747:
URL: https://github.com/apache/lucene/pull/747#discussion_r834419587



##########
File path: 
lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetCounts.java
##########
@@ -178,10 +229,23 @@ private FacetResult getPathResult(
       }
     }
 
-    if (q == null) {
-      return null;
+    if (dimConfig.hierarchical == false) {

Review comment:
       Oh I see. That's tricky. I was actually going to recommend collapsing 
that branching condition at the bottom of `getPathResult` to always leverage 
`childOrdsResult.dimCount`, but I didn't want to nitpick too much. Even though 
it's an internal, private method, it feels super trappy that 
`getChildOrdsResult` can _sometimes_ still produce incorrect values for 
`dimCount`. I'd really prefer we address this so that `dimCount` is always 
correct and not worry about that level of optimization right now. Maybe we can 
tighten that up later? Maybe open a separate issue noting that we're 
double-checking and that we could probably optimize?




-- 
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