mirror of https://github.com/apache/lucene.git
factor out (public static) MultiCollector.scoreMode(Collector[]) method
This commit is contained in:
parent
568c8eba97
commit
ada853e3df
|
@ -101,8 +101,7 @@ public class MultiCollector implements Collector {
|
|||
this.cacheScores = numNeedsScores >= 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScoreMode scoreMode() {
|
||||
public static ScoreMode scoreMode(Collector[] collectors) {
|
||||
ScoreMode scoreMode = null;
|
||||
for (Collector collector : collectors) {
|
||||
if (scoreMode == null) {
|
||||
|
@ -120,6 +119,11 @@ public class MultiCollector implements Collector {
|
|||
return scoreMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScoreMode scoreMode() {
|
||||
return scoreMode(collectors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException {
|
||||
final List<LeafCollector> leafCollectors = new ArrayList<>(collectors.length);
|
||||
|
|
Loading…
Reference in New Issue