Browse Source

Adapt bwc version after backport #28358

Jim Ferenczi 7 years ago
parent
commit
95c45aeb5d

+ 2 - 2
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:

+ 2 - 2
server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/InternalComposite.java

@@ -80,7 +80,7 @@ public class InternalComposite
         }
         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 @@ public class InternalComposite
         }
         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);