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


##########
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 have now added a changes entry, and replaced collector.class with a new 
config parameter. We throw error once collector.class is provided, so we fail 
fast and users know what they have to do.



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