[ML] adjusting post backport (#36222)

This commit is contained in:
Benjamin Trent 2018-12-04 13:29:29 -06:00 committed by GitHub
parent d24b40f688
commit c007a42ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ public class DatafeedConfig extends AbstractDiffable<DatafeedConfig> implements
} else {
this.types = null;
}
if (in.getVersion().before(Version.CURRENT)) {
if (in.getVersion().before(Version.V_6_6_0)) {
this.query = QUERY_TRANSFORMER.toMap(in.readNamedWriteable(QueryBuilder.class));
this.aggregations = AGG_TRANSFORMER.toMap(in.readOptionalWriteable(AggregatorFactories.Builder::new));
} else {
@ -380,7 +380,7 @@ public class DatafeedConfig extends AbstractDiffable<DatafeedConfig> implements
} else {
out.writeBoolean(false);
}
if (out.getVersion().before(Version.CURRENT)) {
if (out.getVersion().before(Version.V_6_6_0)) {
out.writeNamedWriteable(getParsedQuery());
out.writeOptionalWriteable(getParsedAggregations());
} else {