public override void Collect(int doc)
{
Assert.IsFalse(collectionTerminated);
if (Rarely())
{
collectionTerminated = true;
throw new CollectionTerminatedException();
}
}