Adapt bwc version after backport #28310
This commit is contained in:
parent
c675407a70
commit
b10d166190
|
@ -240,8 +240,8 @@ setup:
|
||||||
---
|
---
|
||||||
"Composite aggregation with format":
|
"Composite aggregation with format":
|
||||||
- skip:
|
- skip:
|
||||||
version: " - 6.99.99"
|
version: " - 6.2.99"
|
||||||
reason: this uses a new option (format) added in 7.0.0
|
reason: this uses a new option (format) added in 6.3.0
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
search:
|
search:
|
||||||
|
|
|
@ -74,7 +74,7 @@ public abstract class CompositeValuesSourceBuilder<AB extends CompositeValuesSou
|
||||||
}
|
}
|
||||||
this.missing = in.readGenericValue();
|
this.missing = in.readGenericValue();
|
||||||
this.order = SortOrder.readFromStream(in);
|
this.order = SortOrder.readFromStream(in);
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||||
this.format = in.readOptionalString();
|
this.format = in.readOptionalString();
|
||||||
} else {
|
} else {
|
||||||
this.format = null;
|
this.format = null;
|
||||||
|
@ -97,7 +97,7 @@ public abstract class CompositeValuesSourceBuilder<AB extends CompositeValuesSou
|
||||||
}
|
}
|
||||||
out.writeGenericValue(missing);
|
out.writeGenericValue(missing);
|
||||||
order.writeTo(out);
|
order.writeTo(out);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||||
out.writeOptionalString(format);
|
out.writeOptionalString(format);
|
||||||
}
|
}
|
||||||
innerWriteTo(out);
|
innerWriteTo(out);
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class InternalComposite
|
||||||
this.sourceNames = in.readList(StreamInput::readString);
|
this.sourceNames = in.readList(StreamInput::readString);
|
||||||
this.formats = new ArrayList<>(sourceNames.size());
|
this.formats = new ArrayList<>(sourceNames.size());
|
||||||
for (int i = 0; i < sourceNames.size(); i++) {
|
for (int i = 0; i < sourceNames.size(); i++) {
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||||
formats.add(in.readNamedWriteable(DocValueFormat.class));
|
formats.add(in.readNamedWriteable(DocValueFormat.class));
|
||||||
} else {
|
} else {
|
||||||
formats.add(DocValueFormat.RAW);
|
formats.add(DocValueFormat.RAW);
|
||||||
|
@ -85,7 +85,7 @@ public class InternalComposite
|
||||||
protected void doWriteTo(StreamOutput out) throws IOException {
|
protected void doWriteTo(StreamOutput out) throws IOException {
|
||||||
out.writeVInt(size);
|
out.writeVInt(size);
|
||||||
out.writeStringList(sourceNames);
|
out.writeStringList(sourceNames);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||||
for (DocValueFormat format : formats) {
|
for (DocValueFormat format : formats) {
|
||||||
out.writeNamedWriteable(format);
|
out.writeNamedWriteable(format);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue