From 82cc227da32b35b96e49a4a684e251be6c904539 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 15 Jul 2014 12:13:45 +0200 Subject: [PATCH] Added missing version based serialization --- .../java/org/elasticsearch/action/update/UpdateRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/action/update/UpdateRequest.java b/src/main/java/org/elasticsearch/action/update/UpdateRequest.java index a01beb7fc60..b839002740a 100644 --- a/src/main/java/org/elasticsearch/action/update/UpdateRequest.java +++ b/src/main/java/org/elasticsearch/action/update/UpdateRequest.java @@ -651,7 +651,7 @@ public class UpdateRequest extends InstanceShardOperationRequest 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);