Skip to content

Commit

Permalink
Update the minimum version check on SearchExtBuilder support in Searc…
Browse files Browse the repository at this point in the history
…hResponse (Issue # 9328) (opensearch-project#9641)

Signed-off-by: Austin Lee <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
austintlee authored and shiv0408 committed Apr 25, 2024
1 parent 47d86c8 commit 1c34b21
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ public void writeTo(StreamOutput out) throws IOException {
}

private static List<SearchExtBuilder> readSearchExtBuildersOnOrAfter(StreamInput in) throws IOException {
return (in.getVersion().onOrAfter(Version.V_3_0_0)) ? in.readNamedWriteableList(SearchExtBuilder.class) : Collections.emptyList();
return (in.getVersion().onOrAfter(Version.V_2_10_0)) ? in.readNamedWriteableList(SearchExtBuilder.class) : Collections.emptyList();
}

private static void writeSearchExtBuildersOnOrAfter(StreamOutput out, List<SearchExtBuilder> searchExtBuilders) throws IOException {
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_10_0)) {
out.writeNamedWriteableList(searchExtBuilders);
}
}
Expand Down

0 comments on commit 1c34b21

Please sign in to comment.