You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/08/22 01:04:40 UTC
svn commit: r1619621 -
/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
Author: mikemccand
Date: Thu Aug 21 23:04:40 2014
New Revision: 1619621
URL: http://svn.apache.org/r1619621
Log:
LUCENE-5985: rename constant
Modified:
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java?rev=1619621&r1=1619620&r2=1619621&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java Thu Aug 21 23:04:40 2014
@@ -138,8 +138,8 @@ public final class SegmentInfos implemen
/** The file format version for the segments_N codec header, since 4.9+ */
public static final int VERSION_49 = 3;
- /** The file format version for the segments_N codec header, since 4.10+ */
- public static final int VERSION_410 = 4;
+ /** The file format version for the segments_N codec header, since 4.11+ */
+ public static final int VERSION_411 = 4;
// Used for the segments.gen file only!
// Whenever you add a new format, make it 1 smaller (negative version logic)!
@@ -358,7 +358,7 @@ public final class SegmentInfos implemen
throw new IndexFormatTooOldException(input, magic, CodecUtil.CODEC_MAGIC, CodecUtil.CODEC_MAGIC);
}
// 4.0+
- int format = CodecUtil.checkHeaderNoMagic(input, "segments", VERSION_40, VERSION_410);
+ int format = CodecUtil.checkHeaderNoMagic(input, "segments", VERSION_40, VERSION_411);
version = input.readLong();
counter = input.readInt();
int numSegments = input.readInt();
@@ -423,7 +423,7 @@ public final class SegmentInfos implemen
add(siPerCommit);
}
userData = input.readStringStringMap();
- if (format >= VERSION_410) {
+ if (format >= VERSION_411) {
id = input.readString();
}
@@ -486,7 +486,7 @@ public final class SegmentInfos implemen
try {
segnOutput = directory.createOutput(segmentFileName, IOContext.DEFAULT);
- CodecUtil.writeHeader(segnOutput, "segments", VERSION_410);
+ CodecUtil.writeHeader(segnOutput, "segments", VERSION_411);
segnOutput.writeLong(version);
segnOutput.writeInt(counter); // write counter
segnOutput.writeInt(size()); // write infos