Skip to content

Commit

Permalink
Adapt bwc version after backport #28358
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Jan 25, 2018
1 parent ebe57a9 commit 1eef8d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 1eef8d3

Please sign in to comment.