text: public override void Finish(FieldInfos fis, int numDocs){if (!(pendingDocs.Count == 0)){Flush();}if (numDocs != this.numDocs){throw new Exception("Wrote " + this.numDocs + " docs, finish called with numDocs=" + numDocs);}indexWriter.Finish(numDocs, vectorsStream.GetFilePointer());CodecUtil.WriteFooter(vectorsStream);}