Skip to content

Commit 3313921

Browse files
committed
Adjust wire version for can_match in field-caps
1 parent d10ef76 commit 3313921

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static TransportVersion def(int id) {
176176
public static final TransportVersion ESQL_REPORT_SHARD_PARTITIONING_8_19 = def(8_841_0_29);
177177
public static final TransportVersion ESQL_DRIVER_TASK_DESCRIPTION_8_19 = def(8_841_0_30);
178178
public static final TransportVersion ML_INFERENCE_HUGGING_FACE_CHAT_COMPLETION_ADDED_8_19 = def(8_841_0_31);
179+
public static final TransportVersion V_8_19_FIELD_CAPS_ADD_CLUSTER_ALIAS = def(8_841_0_32);
179180
public static final TransportVersion V_9_0_0 = def(9_000_0_09);
180181
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_1 = def(9_000_0_10);
181182
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_2 = def(9_000_0_11);

server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public FieldCapabilitiesRequest(StreamInput in) throws IOException {
7070
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_13_0)) {
7171
includeEmptyFields = in.readBoolean();
7272
}
73-
if (in.getTransportVersion().onOrAfter(TransportVersions.FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
73+
if (in.getTransportVersion().onOrAfter(TransportVersions.FIELD_CAPS_ADD_CLUSTER_ALIAS)
74+
|| in.getTransportVersion().isPatchFrom(TransportVersions.V_8_19_FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
7475
clusterAlias = in.readOptionalString();
7576
} else {
7677
clusterAlias = RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY;
@@ -124,7 +125,8 @@ public void writeTo(StreamOutput out) throws IOException {
124125
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_13_0)) {
125126
out.writeBoolean(includeEmptyFields);
126127
}
127-
if (out.getTransportVersion().onOrAfter(TransportVersions.FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
128+
if (out.getTransportVersion().onOrAfter(TransportVersions.FIELD_CAPS_ADD_CLUSTER_ALIAS)
129+
|| out.getTransportVersion().isPatchFrom(TransportVersions.V_8_19_FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
128130
out.writeOptionalString(clusterAlias);
129131
}
130132
}

0 commit comments

Comments
 (0)