public override void Finish(FieldInfos fis, int numDocs) { if (!(pendingDocs.Count == 0)) { Flush(); } if (numDocs != this.numDocs) { throw RuntimeException.Create("Wrote " + this.numDocs + " docs, finish called with numDocs=" + numDocs); } indexWriter.Finish(numDocs, vectorsStream.Position); // LUCENENET specific: Renamed from getFilePointer() to match FileStream CodecUtil.WriteFooter(vectorsStream); }
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); }
public override void Finish(FieldInfos fis, int numDocs) { if (numBufferedDocs > 0) { Flush(); } else { Debug.Assert(bufferedDocs.Length == 0); } if (docBase != numDocs) { throw new Exception("Wrote " + docBase + " docs, finish called with numDocs=" + numDocs); } indexWriter.Finish(numDocs, fieldsStream.GetFilePointer()); CodecUtil.WriteFooter(fieldsStream); Debug.Assert(bufferedDocs.Length == 0); }
public override void Finish(FieldInfos fis, int numDocs) { if (numBufferedDocs > 0) { Flush(); } else { if (Debugging.AssertsEnabled) { Debugging.Assert(bufferedDocs.Length == 0); } } if (docBase != numDocs) { throw RuntimeException.Create("Wrote " + docBase + " docs, finish called with numDocs=" + numDocs); } indexWriter.Finish(numDocs, fieldsStream.Position); // LUCENENET specific: Renamed from getFilePointer() to match FileStream CodecUtil.WriteFooter(fieldsStream); if (Debugging.AssertsEnabled) { Debugging.Assert(bufferedDocs.Length == 0); } }