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



##########
File path: lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java
##########
@@ -335,10 +342,22 @@ protected boolean scoreSubDocsAtOnce() {
     /** Hits. */
     public final TopDocs hits;
 
+    /** Collector to compute Facets */
+    FacetsCollector drillDowns;
+
+    /** drill-down dimensions */
+    Map<String, Integer> drillDownDims;

Review comment:
       The idea here is actually a little bit different. What we'd like to do 
is expose the same inputs available to `buildFacetsResult` inside of 
`DrillSidewaysResult`. So the idea is that calling code has direct access to 
the `FacetsCollector` instances, and also knows which dimensions they belong 
to. So what you did here for the `drillDowns` collector is exactly what I was 
thinking (except make it `public` so it has visibility to the calling code 
outside the package). But for the "sideways" collectors, I think we want a 
`Map<String, FacetsCollector>` that maps each drill down dimension to the 
`FacetsCollector` associated with it. Essentially we want calling code to get 
all the same information that `buildFacetsResult` gets, but not force the user 
to produce an instance of `Facets` as a result.




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

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