mirror of https://github.com/apache/lucene.git
LUCENE-4023: Forward port DisjunctionMaxScorer's access to children
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1331303 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
efcd62f311
commit
a5bd0e63cb
|
@ -17,6 +17,9 @@ package org.apache.lucene.search;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Scorer for DisjunctionMaxQuery. The union of all documents generated by the the subquery scorers
|
* The Scorer for DisjunctionMaxQuery. The union of all documents generated by the the subquery scorers
|
||||||
|
@ -183,4 +186,12 @@ class DisjunctionMaxScorer extends Scorer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ChildScorer> getChildren() {
|
||||||
|
final ChildScorer[] children = new ChildScorer[numScorers];
|
||||||
|
for (int i = 0; i< numScorers; i++) {
|
||||||
|
children[i] = new ChildScorer(subScorers[i], BooleanClause.Occur.SHOULD.toString());
|
||||||
|
}
|
||||||
|
return Collections.unmodifiableCollection(Arrays.asList(children));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue