gsmiller commented on a change in pull request #142: URL: https://github.com/apache/lucene/pull/142#discussion_r643959302
########## File path: lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java ########## @@ -131,8 +185,24 @@ public boolean isCacheable(LeafReaderContext ctx) { public BulkScorer bulkScorer(LeafReaderContext context) throws IOException { Scorer baseScorer = baseWeight.scorer(context); + int drillDownCount = drillDowns.length; + + // TODO: If the caller provided a FacetsCollectorManager instead of directly providing + // FacetsCollectors, we assume this will be invoked during a concurrent search. Ideally + // we'd only create new FacetsCollectors for each "leaf slice" that will be concurrently + // searched, as opposed to each actual leaf, but we don't have that information at this + // level so we always provide a new FacetsCollector. There might be a better way to + // refactor this logic. Review comment: Thanks for this suggestion! I realized I never responded. I suspect it wouldn't make all that much of a practical difference if `DrillSidewaysQuery` creates new `FacetsCollector`s for each `BulkScorer` it instantiates (as this implementation currently does), but it feels just a bit "cleaner" if it only created new FCs for each `LeafSlice` since that's the granularity of concurrency within `IndexSearcher`. It would take a bit of refactoring to get this working since the `FacetsCollector`s are a bit of a (package-private) implementation detail of `DrillSidewaysQuery` right now, but I'm going to try to experiment with this a bit more to see what it looks like. Thanks! -- 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