Index: SegmentTermEnum.java =================================================================== --- SegmentTermEnum.java (revision 389043) +++ SegmentTermEnum.java (working copy) @@ -63,6 +63,13 @@ throw new IOException("Unknown format version:" + format); size = input.readLong(); // read the size + if (size == -1) { + // real size is at the end of the file. + long filePos = input.getFilePointer(); + input.seek(input.length() - 8); + size = input.readLong(); + input.seek(filePos); + } if(format == -1){ if (!isIndex) {