javanna commented on code in PR #16798:
URL: https://github.com/apache/lucene/pull/16798#discussion_r4228570951
##########
lucene/core/src/java/org/apache/lucene/search/CollectorManager.java:
##########
@@ -53,4 +53,18 @@ public interface CollectorManager<C extends Collector, T> {
* called after collection is finished on all provided collectors.
*/
T reduce(Collection<C> collectors) throws IOException;
+
+ static CollectorManager<?, Void> singleton(Collector collector) {
+ return new CollectorManager<>() {
+ @Override
+ public Collector newCollector() {
+ return collector;
Review Comment:
This will share the single collector across the different slices, but
execution will still be concurrent and potentially blow up if that single
collector does not handle concurrency?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]