public override void Finish(FieldInfos fis, int numDocs)
 {
     if (4 + ((long)numDocs) * 16 != tvx.GetFilePointer())
     // this is most likely a bug in Sun JRE 1.6.0_04/_05;
     // we detect that the bug has struck, here, and
     // throw an exception to prevent the corruption from
     // entering the index.  See LUCENE-1282 for
     // details.
     {
         throw new Exception("tvx size mismatch: mergedDocs is " + numDocs + " but tvx size is " + tvx.GetFilePointer() + " file=" + tvx.ToString() + "; now aborting this merge to prevent index corruption");
     }
 }
Пример #2
0
 public override void Finish(FieldInfos fis, int numDocs)
 {
     if (Lucene40TermVectorsReader.HEADER_LENGTH_INDEX + ((long)numDocs) * 16 != tvx.Position) // LUCENENET specific: Renamed from getFilePointer() to match FileStream
     // this is most likely a bug in Sun JRE 1.6.0_04/_05;
     // we detect that the bug has struck, here, and
     // throw an exception to prevent the corruption from
     // entering the index.  See LUCENE-1282 for
     // details.
     {
         throw RuntimeException.Create("tvx size mismatch: mergedDocs is " + numDocs + " but tvx size is " + tvx.Position + " file=" + tvx.ToString() + "; now aborting this merge to prevent index corruption");
     }
 }
Пример #3
0
 public override void Finish(FieldInfos fis, int numDocs)
 {
     if (HEADER_LENGTH_IDX + ((long)numDocs) * 8 != indexStream.GetFilePointer())
     // this is most likely a bug in Sun JRE 1.6.0_04/_05;
     // we detect that the bug has struck, here, and
     // throw an exception to prevent the corruption from
     // entering the index.  See LUCENE-1282 for
     // details.
     {
         throw new Exception("fdx size mismatch: docCount is " + numDocs + " but fdx file size is " + indexStream.GetFilePointer() + " file=" + indexStream.ToString() + "; now aborting this merge to prevent index corruption");
     }
 }
 public override void Finish(FieldInfos fis, int numDocs)
 {
     if (4 + ((long)numDocs) * 8 != indexStream.Position) // LUCENENET specific: Renamed from getFilePointer() to match FileStream
     // this is most likely a bug in Sun JRE 1.6.0_04/_05;
     // we detect that the bug has struck, here, and
     // throw an exception to prevent the corruption from
     // entering the index.  See LUCENE-1282 for
     // details.
     {
         throw RuntimeException.Create("fdx size mismatch: docCount is " + numDocs + " but fdx file size is " + indexStream.Position + " file=" + indexStream.ToString() + "; now aborting this merge to prevent index corruption");
     }
 }