mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 08:59:09 +00:00
[ML] Adjust BWC version following backport of #30125
This commit is contained in:
parent
0592b685b9
commit
1de5a3180a
@ -78,7 +78,7 @@ public class CategoryDefinition implements ToXContentObject, Writeable {
|
|||||||
regex = in.readString();
|
regex = in.readString();
|
||||||
maxMatchingLength = in.readLong();
|
maxMatchingLength = in.readLong();
|
||||||
examples = new TreeSet<>(in.readList(StreamInput::readString));
|
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();
|
grokPattern = in.readOptionalString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ public class CategoryDefinition implements ToXContentObject, Writeable {
|
|||||||
out.writeString(regex);
|
out.writeString(regex);
|
||||||
out.writeLong(maxMatchingLength);
|
out.writeLong(maxMatchingLength);
|
||||||
out.writeStringList(new ArrayList<>(examples));
|
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);
|
out.writeOptionalString(grokPattern);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user