Index: src/java/org/apache/lucene/search/BooleanScorer2.java
===================================================================
--- src/java/org/apache/lucene/search/BooleanScorer2.java (revision 613923)
+++ src/java/org/apache/lucene/search/BooleanScorer2.java (working copy)
@@ -175,7 +175,7 @@
}
private Scorer countingDisjunctionSumScorer(final List scorers,
- int minNrShouldMatch)
+ int minNrShouldMatch) throws IOException
// each scorer from the list counted as a single matcher
{
return new DisjunctionSumScorer(scorers, minNrShouldMatch) {
@@ -283,7 +283,7 @@
* Uses the given required scorer and the prohibitedScorers.
* @param requiredCountingSumScorer A required scorer already built.
*/
- private Scorer addProhibitedScorers(Scorer requiredCountingSumScorer)
+ private Scorer addProhibitedScorers(Scorer requiredCountingSumScorer) throws IOException
{
return (prohibitedScorers.size() == 0)
? requiredCountingSumScorer // no prohibited
Index: src/java/org/apache/lucene/search/DisjunctionSumScorer.java
===================================================================
--- src/java/org/apache/lucene/search/DisjunctionSumScorer.java (revision 613923)
+++ src/java/org/apache/lucene/search/DisjunctionSumScorer.java (working copy)
@@ -70,7 +70,7 @@
*
When minimumNrMatchers equals the number of subScorers,
* it more efficient to use ConjunctionScorer.
*/
- public DisjunctionSumScorer( List subScorers, int minimumNrMatchers) {
+ public DisjunctionSumScorer( List subScorers, int minimumNrMatchers) throws IOException{
super(null);
nrScorers = subScorers.size();
@@ -84,12 +84,16 @@
this.minimumNrMatchers = minimumNrMatchers;
this.subScorers = subScorers;
+
+ if (scorerDocQueue == null) {
+ initScorerDocQueue();
+ }
}
/** Construct a DisjunctionScorer, using one as the minimum number
* of matching subscorers.
*/
- public DisjunctionSumScorer(List subScorers) {
+ public DisjunctionSumScorer(List subScorers) throws IOException {
this(subScorers, 1);
}
@@ -140,9 +144,6 @@
}
public boolean next() throws IOException {
- if (scorerDocQueue == null) {
- initScorerDocQueue();
- }
return (scorerDocQueue.size() >= minimumNrMatchers)
&& advanceAfterCurrent();
}
@@ -214,9 +215,6 @@
* @return true iff there is such a match.
*/
public boolean skipTo(int target) throws IOException {
- if (scorerDocQueue == null) {
- initScorerDocQueue();
- }
if (queueSize < minimumNrMatchers) {
return false;
}