Beispiel #1
0
 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.FilePointer);
     CodecUtil.WriteFooter(VectorsStream);
 }
Beispiel #2
0
 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 (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.FilePointer);
     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);
     }
 }
Beispiel #5
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 new Exception("Wrote " + docBase + " docs, finish called with numDocs=" + numDocs);
     }
     indexWriter.Finish(numDocs, fieldsStream.GetFilePointer());
     CodecUtil.WriteFooter(fieldsStream);
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(bufferedDocs.Length == 0);
     }
 }