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;
|
this.cacheScores = numNeedsScores >= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static ScoreMode scoreMode(Collector[] collectors) {
|
||||||
public ScoreMode scoreMode() {
|
|
||||||
ScoreMode scoreMode = null;
|
ScoreMode scoreMode = null;
|
||||||
for (Collector collector : collectors) {
|
for (Collector collector : collectors) {
|
||||||
if (scoreMode == null) {
|
if (scoreMode == null) {
|
||||||
|
@ -120,6 +119,11 @@ public class MultiCollector implements Collector {
|
||||||
return scoreMode;
|
return scoreMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ScoreMode scoreMode() {
|
||||||
|
return scoreMode(collectors);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException {
|
public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException {
|
||||||
final List<LeafCollector> leafCollectors = new ArrayList<>(collectors.length);
|
final List<LeafCollector> leafCollectors = new ArrayList<>(collectors.length);
|
||||||
|
|
Loading…
Reference in New Issue