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;
while (curbase + curUpto < seg.End)
{
if (curUpto == CurDocs.Length)
{
curbase += CurDocs.Length;
CurDocs = CachedDocs[chunkUpto];
chunkUpto++;
curUpto = 0;
}
other.Collect(CurDocs[curUpto++]);
}
}
}