From 65debde4363fc3f9ec1cbc2f0f15d6e7a4c46305 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 8 Mar 2022 11:30:48 -0500 Subject: [PATCH] Update the BWC versions (post 1.x backport) (#2390) 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 48b4f29ea8d..4987f260bc9 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 abstract class 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 abstract class ScoreFunctionBuilder> @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);