|
13 | 13 | import org.elasticsearch.common.io.stream.StreamInput;
|
14 | 14 | import org.elasticsearch.common.io.stream.StreamOutput;
|
15 | 15 | import org.elasticsearch.common.unit.TimeValue;
|
16 |
| -import org.elasticsearch.common.util.CachedSupplier; |
17 | 16 | import org.elasticsearch.common.xcontent.ObjectParser;
|
18 | 17 | import org.elasticsearch.common.xcontent.ToXContentObject;
|
19 | 18 | import org.elasticsearch.common.xcontent.XContentBuilder;
|
|
30 | 29 | import org.elasticsearch.xpack.core.ml.datafeed.extractor.ExtractorUtils;
|
31 | 30 | import org.elasticsearch.xpack.core.ml.job.config.Job;
|
32 | 31 | import org.elasticsearch.xpack.core.ml.job.messages.Messages;
|
| 32 | +import org.elasticsearch.xpack.core.ml.utils.CachedSupplier; |
33 | 33 | import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper;
|
34 | 34 | import org.elasticsearch.xpack.core.ml.utils.MlStrings;
|
35 | 35 | import org.elasticsearch.xpack.core.ml.utils.ToXContentParams;
|
@@ -256,7 +256,7 @@ public DatafeedConfig(StreamInput in) throws IOException {
|
256 | 256 | } else {
|
257 | 257 | this.types = null;
|
258 | 258 | }
|
259 |
| - if (in.getVersion().before(Version.CURRENT)) { |
| 259 | + if (in.getVersion().before(Version.V_6_6_0)) { |
260 | 260 | this.query = QUERY_TRANSFORMER.toMap(in.readNamedWriteable(QueryBuilder.class));
|
261 | 261 | this.aggregations = AGG_TRANSFORMER.toMap(in.readOptionalWriteable(AggregatorFactories.Builder::new));
|
262 | 262 | } else {
|
@@ -384,7 +384,7 @@ public void writeTo(StreamOutput out) throws IOException {
|
384 | 384 | } else {
|
385 | 385 | out.writeBoolean(false);
|
386 | 386 | }
|
387 |
| - if (out.getVersion().before(Version.CURRENT)) { |
| 387 | + if (out.getVersion().before(Version.V_6_6_0)) { |
388 | 388 | out.writeNamedWriteable(getParsedQuery());
|
389 | 389 | out.writeOptionalWriteable(getParsedAggregations());
|
390 | 390 | } else {
|
|
0 commit comments