javanna commented on code in PR #13602:
URL: https://github.com/apache/lucene/pull/13602#discussion_r1687812812


##########
lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java:
##########
@@ -46,17 +46,17 @@ public boolean withCollector() {
   }
 
   @Override
-  protected Collector createCollector() throws Exception {
-    Collector collector = null;
+  protected CollectorManager<?, ?> createCollectorManager() throws Exception {
+    CollectorManager<?, ?> collectorManager;
     if (clnName.equalsIgnoreCase("topScoreDoc") == true) {
-      collector = TopScoreDocCollector.create(numHits(), Integer.MAX_VALUE);
+      collectorManager = new TopScoreDocCollectorManager(numHits(), 
Integer.MAX_VALUE);
     } else if (clnName.length() > 0) {
-      collector = 
Class.forName(clnName).asSubclass(Collector.class).getConstructor().newInstance();
-
+      collectorManager =
+          
Class.forName(clnName).asSubclass(CollectorManager.class).getConstructor().newInstance();
     } else {
-      collector = super.createCollector();
+      collectorManager = super.createCollectorManager();
     }
-    return collector;
+    return collectorManager;

Review Comment:
   I am not familiar with this utility and I wonder if this type of change is 
acceptable for a major release, whether there's other ways. If we continue down 
this route, how do we document the breaking change, and should we deprecate 
createCollector in the 9x branch?



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