protected override void FillDocsAndScores(FixedBitSet matchingDocs, Bits acceptDocs,
TermsEnum termsEnum)
{
BytesRef spare = new BytesRef();
DocsEnum docsEnum = null;
for (int i = 0; i < outerInstance._terms.Size(); i++)
{
if (termsEnum.SeekExact(outerInstance._terms.Get(outerInstance._ords[i], spare)))
{
docsEnum = termsEnum.Docs(acceptDocs, docsEnum, FLAG_NONE);
float score = outerInstance._scores[outerInstance._ords[i]];
for (int doc = docsEnum.NextDoc();
doc != NO_MORE_DOCS;
doc = docsEnum.NextDoc())
{
// I prefer this:
/*if (scores[doc] < score) {
scores[doc] = score;
matchingDocs.set(doc);
}*/
// But this behaves the same as MVInnerScorer and only then the tests will pass:
if (!matchingDocs.Get(doc))
{
scores[doc] = score;
matchingDocs.Set(doc);
}
}
}
}
}
}