@@ -684,7 +684,7 @@ private static class IndexMetaDataDiff implements Diff<IndexMetaData> {
684
684
index = in .readString ();
685
685
routingNumShards = in .readInt ();
686
686
version = in .readLong ();
687
- if (in .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
687
+ if (in .getVersion ().onOrAfter (Version .V_6_5_0 )) {
688
688
mappingVersion = in .readVLong ();
689
689
} else {
690
690
mappingVersion = 1 ;
@@ -724,7 +724,7 @@ public void writeTo(StreamOutput out) throws IOException {
724
724
out .writeString (index );
725
725
out .writeInt (routingNumShards );
726
726
out .writeLong (version );
727
- if (out .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
727
+ if (out .getVersion ().onOrAfter (Version .V_6_5_0 )) {
728
728
out .writeVLong (mappingVersion );
729
729
}
730
730
out .writeByte (state .id );
@@ -760,7 +760,7 @@ public IndexMetaData apply(IndexMetaData part) {
760
760
public static IndexMetaData readFrom (StreamInput in ) throws IOException {
761
761
Builder builder = new Builder (in .readString ());
762
762
builder .version (in .readLong ());
763
- if (in .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
763
+ if (in .getVersion ().onOrAfter (Version .V_6_5_0 )) {
764
764
builder .mappingVersion (in .readVLong ());
765
765
} else {
766
766
builder .mappingVersion (1 );
@@ -804,7 +804,7 @@ public static IndexMetaData readFrom(StreamInput in) throws IOException {
804
804
public void writeTo (StreamOutput out ) throws IOException {
805
805
out .writeString (index .getName ()); // uuid will come as part of settings
806
806
out .writeLong (version );
807
- if (out .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
807
+ if (out .getVersion ().onOrAfter (Version .V_6_5_0 )) {
808
808
out .writeVLong (mappingVersion );
809
809
}
810
810
out .writeInt (routingNumShards );
@@ -1370,8 +1370,8 @@ public static IndexMetaData fromXContent(XContentParser parser) throws IOExcepti
1370
1370
throw new IllegalArgumentException ("Unexpected token " + token );
1371
1371
}
1372
1372
}
1373
- if (Assertions .ENABLED && Version .indexCreated (builder .settings ).onOrAfter (Version .V_7_0_0_alpha1 )) {
1374
- assert mappingVersion : "mapping version should be present for indices created on or after 7.0 .0" ;
1373
+ if (Assertions .ENABLED && Version .indexCreated (builder .settings ).onOrAfter (Version .V_6_5_0 )) {
1374
+ assert mappingVersion : "mapping version should be present for indices created on or after 6.5 .0" ;
1375
1375
}
1376
1376
return builder .build ();
1377
1377
}
0 commit comments