[ML] Adjust BWC version following backport of #30125

This commit is contained in:
David Roberts 2018-05-15 09:45:37 +01:00
parent 0592b685b9
commit 1de5a3180a
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ public class CategoryDefinition implements ToXContentObject, Writeable {
regex = in.readString();
maxMatchingLength = in.readLong();
examples = new TreeSet<>(in.readList(StreamInput::readString));
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
grokPattern = in.readOptionalString();
}
}
@ -91,7 +91,7 @@ public class CategoryDefinition implements ToXContentObject, Writeable {
out.writeString(regex);
out.writeLong(maxMatchingLength);
out.writeStringList(new ArrayList<>(examples));
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
out.writeOptionalString(grokPattern);
}
}