Skip to content

Commit 02e3c56

Browse files
Replace the right version to fix backward compatibility introduced with DerivedFields feature (opensearch-project#13168)
Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
1 parent 52ce070 commit 02e3c56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/org/opensearch/search/builder/SearchSourceBuilder.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public SearchSourceBuilder(StreamInput in) throws IOException {
289289
if (in.getVersion().onOrAfter(Version.V_2_13_0)) {
290290
includeNamedQueriesScore = in.readOptionalBoolean();
291291
}
292-
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
292+
if (in.getVersion().onOrAfter(Version.V_2_14_0)) {
293293
if (in.readBoolean()) {
294294
derivedFieldsObject = in.readMap();
295295
}
@@ -365,7 +365,7 @@ public void writeTo(StreamOutput out) throws IOException {
365365
if (out.getVersion().onOrAfter(Version.V_2_13_0)) {
366366
out.writeOptionalBoolean(includeNamedQueriesScore);
367367
}
368-
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
368+
if (out.getVersion().onOrAfter(Version.V_2_14_0)) {
369369
boolean hasDerivedFieldsObject = derivedFieldsObject != null;
370370
out.writeBoolean(hasDerivedFieldsObject);
371371
if (hasDerivedFieldsObject) {

0 commit comments

Comments
 (0)