public override void Replay(Collector other)
{
ReplayInit(other);
int curUpto = 0;
int curBase = 0;
int chunkUpto = 0;
CurDocs = EMPTY_INT_ARRAY;
foreach (SegStart seg in CachedSegs)
{
other.NextReader = seg.ReaderContext;
other.Scorer = CachedScorer;
while (curBase + curUpto < seg.End)
{
if (curUpto == CurDocs.Length)
{
curBase += CurDocs.Length;
CurDocs = CachedDocs[chunkUpto];
CurScores = CachedScores[chunkUpto];
chunkUpto++;
curUpto = 0;
}
CachedScorer.Score_Renamed = CurScores[curUpto];
CachedScorer.Doc = CurDocs[curUpto];
other.Collect(CurDocs[curUpto++]);
}
}
}