Skip to content

Commit 6202ab0

Browse files
authored
Fix versions and breaking API changes (opensearch-project#17031)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
1 parent 73e11af commit 6202ab0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/search_shards/20_slice.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
"Search shards with slice specified in body":
33
- skip:
4-
version: " - 2.99.99"
4+
version: " - 2.18.99"
55
reason: "Added slice body to search_shards in 2.19"
66
- do:
77
indices.create:

server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public ClusterSearchShardsRequest(StreamInput in) throws IOException {
8080
preference = in.readOptionalString();
8181

8282
indicesOptions = IndicesOptions.readIndicesOptions(in);
83-
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
83+
if (in.getVersion().onOrAfter(Version.V_2_19_0)) {
8484
boolean hasSlice = in.readBoolean();
8585
if (hasSlice) {
8686
sliceBuilder = new SliceBuilder(in);
@@ -95,7 +95,7 @@ public void writeTo(StreamOutput out) throws IOException {
9595
out.writeOptionalString(routing);
9696
out.writeOptionalString(preference);
9797
indicesOptions.writeIndicesOptions(out);
98-
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
98+
if (out.getVersion().onOrAfter(Version.V_2_19_0)) {
9999
if (sliceBuilder != null) {
100100
out.writeBoolean(true);
101101
sliceBuilder.writeTo(out);

0 commit comments

Comments
 (0)