Index: DisjunctionSumScorer.java =================================================================== --- DisjunctionSumScorer.java (revision 225378) +++ DisjunctionSumScorer.java (working copy) @@ -167,6 +167,16 @@ } else { currentScore += top.score(); nrMatchers++; + if (nrMatchers > nrScorers) { + throw new AssertionError("nrMatchers: " + nrMatchers + + " bigger than nrScorers: " + nrScorers + + "\nminimumNrMatchers: " + minimumNrMatchers + + ", currentDoc: " + currentDoc + + ", currentScore: " + currentScore + + "\ntop: " + top + + "\nscorerQueue.size(): " + scorerQueue.size() + ); + } } } while (true);