stefanvodita commented on code in PR #13568:
URL: https://github.com/apache/lucene/pull/13568#discussion_r1709557365


##########
lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java:
##########
@@ -45,58 +45,26 @@ class DrillSidewaysQuery extends Query {
 
   final Query baseQuery;
 
-  final FacetsCollectorManager drillDownCollectorManager;
-  final FacetsCollectorManager[] drillSidewaysCollectorManagers;
-  final List<FacetsCollector> managedDrillDownCollectors;
-  final List<FacetsCollector[]> managedDrillSidewaysCollectors;
+  final CollectorOwner<?, ?> drillDownCollectorOwner;
+  final List<CollectorOwner<?, ?>> drillSidewaysCollectorOwners;
 
   final Query[] drillDownQueries;
 
   final boolean scoreSubDocsAtOnce;
 
   /**
    * Construct a new {@code DrillSidewaysQuery} that will create new {@link 
FacetsCollector}s for
-   * each {@link LeafReaderContext} using the provided {@link 
FacetsCollectorManager}s. The caller
-   * can access the created {@link FacetsCollector}s through {@link 
#managedDrillDownCollectors} and
-   * {@link #managedDrillSidewaysCollectors}.
+   * each {@link LeafReaderContext} using the provided {@link 
FacetsCollectorManager}s.
    */
   DrillSidewaysQuery(
       Query baseQuery,
-      FacetsCollectorManager drillDownCollectorManager,
-      FacetsCollectorManager[] drillSidewaysCollectorManagers,
-      Query[] drillDownQueries,
-      boolean scoreSubDocsAtOnce) {
-    // Note that the "managed" facet collector lists are synchronized here 
since bulkScorer()
-    // can be invoked concurrently and needs to remain thread-safe. We're OK 
with synchronizing
-    // on the whole list as contention is expected to remain very low:
-    this(
-        baseQuery,
-        drillDownCollectorManager,
-        drillSidewaysCollectorManagers,
-        Collections.synchronizedList(new ArrayList<>()),
-        Collections.synchronizedList(new ArrayList<>()),
-        drillDownQueries,
-        scoreSubDocsAtOnce);
-  }
-
-  /**
-   * Needed for {@link Query#rewrite(IndexSearcher)}. Ensures the same 
"managed" lists get used
-   * since {@link DrillSideways} accesses references to these through the 
original {@code
-   * DrillSidewaysQuery}.
-   */
-  private DrillSidewaysQuery(
-      Query baseQuery,
-      FacetsCollectorManager drillDownCollectorManager,
-      FacetsCollectorManager[] drillSidewaysCollectorManagers,
-      List<FacetsCollector> managedDrillDownCollectors,
-      List<FacetsCollector[]> managedDrillSidewaysCollectors,
+      CollectorOwner<?, ?> drillDownCollectorOwner,

Review Comment:
   For 9.12, could we preserve the old ctor and additionally provide a new one 
to avoid the API break?



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