protected internal virtual bool AdvanceAfterCurrent()
{
do
{
// repeat until minimum nr of matchers
currentDoc = scorerDocQueue.TopDoc();
currentScore = scorerDocQueue.TopScore();
nrMatchers = 1;
do
{
// Until all subscorers are after currentDoc
if (!scorerDocQueue.TopNextAndAdjustElsePop())
{
if (scorerDocQueue.Size() == 0)
{
break; // nothing more to advance, check for last match.
}
}
if (scorerDocQueue.TopDoc() != currentDoc)
{
break; // All remaining subscorers are after currentDoc.
}
currentScore += scorerDocQueue.TopScore();
nrMatchers++;
}
while (true);
if (nrMatchers >= minimumNrMatchers)
{
return true;
}
else if (scorerDocQueue.Size() < minimumNrMatchers)
{
return false;
}
}
while (true);
}