From 1eef8d33c6887172e25377cc7876a85ec9bc3c7a Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Thu, 25 Jan 2018 09:54:22 +0100 Subject: [PATCH] Adapt bwc version after backport #28358 --- .../rest-api-spec/test/search.aggregation/230_composite.yml | 4 ++-- .../aggregations/bucket/composite/InternalComposite.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml index f18cdba837443..b8c89517ec119 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml @@ -299,8 +299,8 @@ setup: --- "Composite aggregation with after_key in the response": - skip: - version: " - 6.99.99" - reason: starting in 7.0.0 after_key is returned in the response + version: " - 6.2.99" + reason: starting in 6.3.0 after_key is returned in the response - do: search: diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/InternalComposite.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/InternalComposite.java index db65f0cc3636e..c9cb320d80d99 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/InternalComposite.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/InternalComposite.java @@ -80,7 +80,7 @@ public InternalComposite(StreamInput in) throws IOException { } this.reverseMuls = in.readIntArray(); this.buckets = in.readList((input) -> new InternalBucket(input, sourceNames, formats, reverseMuls)); - if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (in.getVersion().onOrAfter(Version.V_6_3_0)) { this.afterKey = in.readBoolean() ? new CompositeKey(in) : null; } else { this.afterKey = buckets.size() > 0 ? buckets.get(buckets.size()-1).key : null; @@ -98,7 +98,7 @@ protected void doWriteTo(StreamOutput out) throws IOException { } out.writeIntArray(reverseMuls); out.writeList(buckets); - if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (out.getVersion().onOrAfter(Version.V_6_3_0)) { out.writeBoolean(afterKey != null); if (afterKey != null) { afterKey.writeTo(out);