Skip to content

Commit

Permalink
Update the BWC versions (post 1.x backport)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Mar 8, 2022
1 parent e1fd4b7 commit 53049ec
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 53049ec

Please sign in to comment.