You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/06/27 01:17:31 UTC

[GitHub] [lucene] mikemccand commented on a change in pull request #181: LUCENE-10001: Make CollectionTerminatedException handling in MultiCollector configurable

mikemccand commented on a change in pull request #181:
URL: https://github.com/apache/lucene/pull/181#discussion_r659245670



##########
File path: lucene/core/src/java/org/apache/lucene/search/MultiCollector.java
##########
@@ -78,14 +107,17 @@ public static Collector wrap(Iterable<? extends Collector> collectors) {
           colls[n++] = c;
         }
       }
-      return new MultiCollector(colls);
+      return new MultiCollector(earlyTerminationBehavior, colls);
     }
   }
 
+  private final EarlyTerminationBehavior earlyTerminationBehavior;
   private final boolean cacheScores;
   private final Collector[] collectors;
 
-  private MultiCollector(Collector... collectors) {
+  private MultiCollector(
+      EarlyTerminationBehavior earlyTerminationBehavior, Collector... collectors) {

Review comment:
       This might be a little too much over-designing for now ("design for today").  And the `FacetCollector` example is not a normal use case I think (`FacetCollector` does not normally early terminate?).  I think most use-cases for `MultiCollector` would want all collectors to collect the same set of hits.




-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org