From 69f739d3d03e505787ac39ac496fdded0471e0b1 Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Fri, 5 Oct 2018 13:07:08 +0200 Subject: [PATCH] Adapt bwc version after backport Relates #33587 --- .../org/elasticsearch/search/sort/NestedSortBuilder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/search/sort/NestedSortBuilder.java b/server/src/main/java/org/elasticsearch/search/sort/NestedSortBuilder.java index 03cb64da5a9d4..eb39a8e0bc3bb 100644 --- a/server/src/main/java/org/elasticsearch/search/sort/NestedSortBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/sort/NestedSortBuilder.java @@ -54,7 +54,7 @@ public NestedSortBuilder(StreamInput in) throws IOException { path = in.readOptionalString(); filter = in.readOptionalNamedWriteable(QueryBuilder.class); nestedSort = in.readOptionalWriteable(NestedSortBuilder::new); - if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (in.getVersion().onOrAfter(Version.V_6_5_0)) { maxChildren = in.readVInt(); } else { maxChildren = Integer.MAX_VALUE; @@ -98,10 +98,8 @@ public void writeTo(final StreamOutput out) throws IOException { out.writeOptionalString(path); out.writeOptionalNamedWriteable(filter); out.writeOptionalWriteable(nestedSort); - if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (out.getVersion().onOrAfter(Version.V_6_5_0)) { out.writeVInt(maxChildren); - } else { - out.writeVInt(Integer.MAX_VALUE); } }