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: [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]