Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Update the BWC versions (post 1.x backport) (opensearch-project#2390)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta authored Mar 8, 2022
1 parent 919d180 commit 65debde
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ public ScoreFunctionBuilder() {}
*/
public ScoreFunctionBuilder(StreamInput in) throws IOException {
weight = checkWeight(in.readOptionalFloat());
if (in.getVersion().onOrAfter(Version.V_2_0_0)) {
if (in.getVersion().onOrAfter(Version.V_1_3_0)) {
functionName = in.readOptionalString();
}
}

@Override
public final void writeTo(StreamOutput out) throws IOException {
out.writeOptionalFloat(weight);
if (out.getVersion().onOrAfter(Version.V_2_0_0)) {
if (out.getVersion().onOrAfter(Version.V_1_3_0)) {
out.writeOptionalString(functionName);
}
doWriteTo(out);
Expand Down

0 comments on commit 65debde

Please sign in to comment.