>> The same documents still match in the tests, only some score values change.
> Could you elaborate on this point? Are the old or new scores correct?
From a quick look the new scorer look better than the old ones. In one of the test
docs the test query matches 3 times, and it now scores higher than the doc with the single match
(the one in which only docs D and A match).
> > I don't know whether DisjunctionSumScorerPatch5.txt is still needed, but it should not hurt.
> I was going to commit that one anyway... it looks like a bug if skipTo(target) is called with target<= currentDoc.
> Most scorers wouldn't do that, so I don't know if it's ever manifested as an error.
The two changes (in DisjunctionSumScorerPatch5.txt and in the posted SpanScorer) are different in that
for DisjunctionSumScorer the test is against the current doc of the scorer and in
SpanScorer the test is against the current doc of the subscorer.
So I think in DisjunctionSumScorer the test may not be needed, but in SpanScorer it should be there.
However, I don't have a test case showing the out of bounds problem, so I'd like to know
whether this problem persists with the posted SpanScorer.