Added missing version based serialization

This commit is contained in:
Simon Willnauer 2014-07-15 12:13:45 +02:00
parent 73d93e5fd8
commit 82cc227da3
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ public class UpdateRequest extends InstanceShardOperationRequest<UpdateRequest>
out.writeString(id);
out.writeOptionalString(routing);
out.writeOptionalString(script);
if (script != null) {
if (script != null && out.getVersion().onOrAfter(Version.V_1_3_0)) {
ScriptService.ScriptType.writeTo(scriptType, out);
}
out.writeOptionalString(scriptLang);