text: public override int NextPosition(){if (doc != 0){throw new Exception();}else if (i >= termFreq - 1){throw new Exception("Read past last position");}++i;if (payloadIndex != null){payload.Offset = basePayloadOffset + payloadIndex[positionIndex + i];payload.Length = payloadIndex[positionIndex + i + 1] - payloadIndex[positionIndex + i];}if (positions == null){return -1;}else{return positions[positionIndex + i];}}