@@ -684,7 +684,7 @@ private static class IndexMetaDataDiff implements Diff<IndexMetaData> {
684684 index = in .readString ();
685685 routingNumShards = in .readInt ();
686686 version = in .readLong ();
687- if (in .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
687+ if (in .getVersion ().onOrAfter (Version .V_6_5_0 )) {
688688 mappingVersion = in .readVLong ();
689689 } else {
690690 mappingVersion = 1 ;
@@ -724,7 +724,7 @@ public void writeTo(StreamOutput out) throws IOException {
724724 out .writeString (index );
725725 out .writeInt (routingNumShards );
726726 out .writeLong (version );
727- if (out .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
727+ if (out .getVersion ().onOrAfter (Version .V_6_5_0 )) {
728728 out .writeVLong (mappingVersion );
729729 }
730730 out .writeByte (state .id );
@@ -760,7 +760,7 @@ public IndexMetaData apply(IndexMetaData part) {
760760 public static IndexMetaData readFrom (StreamInput in ) throws IOException {
761761 Builder builder = new Builder (in .readString ());
762762 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 )) {
764764 builder .mappingVersion (in .readVLong ());
765765 } else {
766766 builder .mappingVersion (1 );
@@ -804,7 +804,7 @@ public static IndexMetaData readFrom(StreamInput in) throws IOException {
804804 public void writeTo (StreamOutput out ) throws IOException {
805805 out .writeString (index .getName ()); // uuid will come as part of settings
806806 out .writeLong (version );
807- if (out .getVersion ().onOrAfter (Version .V_7_0_0_alpha1 )) {
807+ if (out .getVersion ().onOrAfter (Version .V_6_5_0 )) {
808808 out .writeVLong (mappingVersion );
809809 }
810810 out .writeInt (routingNumShards );
@@ -1370,8 +1370,8 @@ public static IndexMetaData fromXContent(XContentParser parser) throws IOExcepti
13701370 throw new IllegalArgumentException ("Unexpected token " + token );
13711371 }
13721372 }
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" ;
13751375 }
13761376 return builder .build ();
13771377 }
0 commit comments