[ https://issues.apache.org/jira/browse/LUCENE-9944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17343864#comment-17343864 ]
Greg Miller commented on LUCENE-9944: ------------------------------------- Adding a comment here mostly for myself so I don't forget: I came back to working on this yesterday and realized it's not quite as straight-forward as my initial hacky attempt at it. The core issue is that {{DrillSidewaysQuery}} cannot be "shared" across multiple collectors (so it is invalid to call {{IndexSearcher#search(Query, CollectorManager}} and pass a DSQ as the Query). This is because the {{BulkScorer}} created by DSQ cannot be shared across concurrently-running collectors since it collects into common {{FacetCollector}} instances that it manages internally. So in essence, if {{IndexSearcher}} has an {{Executor}} and is going to execute concurrent collection, the internal {{FacetCollector}} instances that DSQ is managing might be shared across threads, which will cause problems. I'll start figuring out how to design around this, but wanted to note it here in case I have to context switch off this again and forget. (Or if anyone else has thoughts, that's great too!) > Implement alternative drill sideways faceting with provided CollectorManager > ---------------------------------------------------------------------------- > > Key: LUCENE-9944 > URL: https://issues.apache.org/jira/browse/LUCENE-9944 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/facet > Affects Versions: main (9.0) > Reporter: Greg Miller > Priority: Minor > > Today, if a user of {{DrillSideways}} wants to provide their own > {{CollectorManager}} when invoking {{search}}, they get this alternate, > "concurrent" implementation that creates N copies of the provided > {{DrillDownQuery}} (where N is the number of drill-down dimensions) and runs > them all concurrently. This is a very different implementation than the one a > user would get if providing a {{Collector}} instead. Additionally, an > {{ExecutorService}} must be provided when constructing a {{DrillSideways}} > instance if the user wants to bring their own {{CollectorManager}} > (otherwise, they'll get an unfriendly NPE when calling {{search}}). > I propose adding an implementation to {{DrillSideways}} that will run the > "non-concurrent" algorithm in the case that a user wants to provide their own > {{CollectorManager}} but doesn't want to provide an {{ExecutorService}} (and > doesn't want the concurrent algorithm). -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org