diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/validate/template/RenderSearchTemplateRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/validate/template/RenderSearchTemplateRequest.java index a51090e1402..81ff9021815 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/validate/template/RenderSearchTemplateRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/validate/template/RenderSearchTemplateRequest.java @@ -63,7 +63,7 @@ public class RenderSearchTemplateRequest extends ActionRequest implements Indic indicesOptions = IndicesOptions.readIndicesOptions(in); requestCache = in.readOptionalBoolean(); - template = in.readOptionalStreamable(Template::new); + template = in.readOptionalWriteable(Template::new); } @Override @@ -357,6 +357,6 @@ public class SearchRequest extends ActionRequest implements Indic out.writeStringArray(types); indicesOptions.writeIndicesOptions(out); out.writeOptionalBoolean(requestCache); - out.writeOptionalStreamable(template); + out.writeOptionalWriteable(template); } } diff --git a/core/src/main/java/org/elasticsearch/action/update/UpdateRequest.java b/core/src/main/java/org/elasticsearch/action/update/UpdateRequest.java index 0877ea1c66b..31f219fd4c7 100644 --- a/core/src/main/java/org/elasticsearch/action/update/UpdateRequest.java +++ b/core/src/main/java/org/elasticsearch/action/update/UpdateRequest.java @@ -727,7 +727,7 @@ public class UpdateRequest extends InstanceShardOperationRequest routing = in.readOptionalString(); parent = in.readOptionalString(); if (in.readBoolean()) { - script = Script.readScript(in); + script = new Script(in); } retryOnConflict = in.readVInt(); refresh = in.readBoolean(); diff --git a/core/src/main/java/org/elasticsearch/index/query/ScriptQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/ScriptQueryBuilder.java index 65be61d672b..8ff254b3462 100644 --- a/core/src/main/java/org/elasticsearch/index/query/ScriptQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/ScriptQueryBuilder.java @@ -68,7 +68,7 @@ public class ScriptQueryBuilder extends AbstractQueryBuilder */ public ScriptQueryBuilder(StreamInput in) throws IOException { super(in); - script = Script.readScript(in); + script = new Script(in); } @Override diff --git a/core/src/main/java/org/elasticsearch/index/query/TemplateQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/TemplateQueryBuilder.java index e51a18b6adc..abd4f4b176f 100644 --- a/core/src/main/java/org/elasticsearch/index/query/TemplateQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/TemplateQueryBuilder.java @@ -102,7 +102,7 @@ public class TemplateQueryBuilder extends AbstractQueryBuilder SUPPLIER = new Supplier