Adjust bwc version for put mapping requests

Relates #37675
This commit is contained in:
Nhat Nguyen 2019-01-27 21:50:46 -05:00
parent 0a850f032b
commit 9ceb218d85
1 changed files with 2 additions and 2 deletions

View File

@ -312,7 +312,7 @@ public class PutMappingRequest extends AcknowledgedRequest<PutMappingRequest> im
in.readBoolean(); // updateAllTypes in.readBoolean(); // updateAllTypes
} }
concreteIndex = in.readOptionalWriteable(Index::new); concreteIndex = in.readOptionalWriteable(Index::new);
if (in.getVersion().onOrAfter(Version.V_7_0_0)) { if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
origin = in.readOptionalString(); origin = in.readOptionalString();
} else { } else {
origin = null; origin = null;
@ -330,7 +330,7 @@ public class PutMappingRequest extends AcknowledgedRequest<PutMappingRequest> im
out.writeBoolean(true); // updateAllTypes out.writeBoolean(true); // updateAllTypes
} }
out.writeOptionalWriteable(concreteIndex); out.writeOptionalWriteable(concreteIndex);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) { if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeOptionalString(origin); out.writeOptionalString(origin);
} }
} }