From 53049ec694460b4943313a2dfc375f95a14b0a12 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Mon, 7 Mar 2022 11:54:39 -0500 Subject: [PATCH] Update the BWC versions (post 1.x backport) Signed-off-by: Andriy Redko --- .../index/query/functionscore/ScoreFunctionBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilder.java b/server/src/main/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilder.java index 48b4f29ea8dcc..4987f260bc9b4 100644 --- a/server/src/main/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilder.java @@ -60,7 +60,7 @@ public ScoreFunctionBuilder() {} */ public ScoreFunctionBuilder(StreamInput in) throws IOException { weight = checkWeight(in.readOptionalFloat()); - if (in.getVersion().onOrAfter(Version.V_2_0_0)) { + if (in.getVersion().onOrAfter(Version.V_1_3_0)) { functionName = in.readOptionalString(); } } @@ -68,7 +68,7 @@ public ScoreFunctionBuilder(StreamInput in) throws IOException { @Override public final void writeTo(StreamOutput out) throws IOException { out.writeOptionalFloat(weight); - if (out.getVersion().onOrAfter(Version.V_2_0_0)) { + if (out.getVersion().onOrAfter(Version.V_1_3_0)) { out.writeOptionalString(functionName); } doWriteTo(out);