From 20de4762aab382712a05a2177ec73908406c0287 Mon Sep 17 00:00:00 2001 From: Harsha Vamsi Kalluri Date: Thu, 22 Aug 2024 13:08:25 -0400 Subject: [PATCH] Update version check Signed-off-by: Harsha Vamsi Kalluri --- .../java/org/opensearch/index/query/TermsQueryBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/index/query/TermsQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/TermsQueryBuilder.java index f5e585f0f1f57..65e60d76f253c 100644 --- a/server/src/main/java/org/opensearch/index/query/TermsQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/TermsQueryBuilder.java @@ -258,7 +258,7 @@ public TermsQueryBuilder(StreamInput in) throws IOException { termsLookup = in.readOptionalWriteable(TermsLookup::new); values = (List) in.readGenericValue(); this.supplier = null; - if (in.getVersion().after(Version.V_3_0_0)) { + if (in.getVersion().onOrAfter(Version.V_3_0_0)) { rewriteOverride = in.readOptionalString(); } if (in.getVersion().onOrAfter(Version.V_2_17_0)) { @@ -274,7 +274,7 @@ protected void doWriteTo(StreamOutput out) throws IOException { out.writeString(fieldName); out.writeOptionalWriteable(termsLookup); out.writeGenericValue(values); - if (out.getVersion().after(Version.V_3_0_0)) { + if (out.getVersion().onOrAfter(Version.V_3_0_0)) { out.writeOptionalString(rewriteOverride); } if (out.getVersion().onOrAfter(Version.V_2_17_0)) {