Skip to content

Commit d9c62d3

Browse files
committed
Don't serialize match options
1 parent d8fdaf5 commit d9c62d3

File tree

2 files changed

+3
-10
lines changed
  • server/src/main/java/org/elasticsearch
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext

2 files changed

+3
-10
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ static TransportVersion def(int id) {
157157
public static final TransportVersion KQL_QUERY_TECH_PREVIEW = def(8_823_00_0);
158158
public static final TransportVersion ESQL_PROFILE_ROWS_PROCESSED = def(8_824_00_0);
159159
public static final TransportVersion BYTE_SIZE_VALUE_ALWAYS_USES_BYTES = def(8_825_00_0);
160-
public static final TransportVersion ESQL_MATCH_OPTIONS = def(8_826_00_0);
161160

162161
/*
163162
* STOP! READ THIS FIRST! No, really,

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public class Match extends FullTextFunction implements PostOptimizationVerificat
9494

9595
private final Expression field;
9696

97-
private final Expression options;
97+
// Options for match function. They don't need to be serialized as the data nodes will retrieve them from the query builder
98+
private final transient Expression options;
9899

99100
private transient Boolean isOperator;
100101

@@ -191,11 +192,7 @@ private static Match readFrom(StreamInput in) throws IOException {
191192
if (in.getTransportVersion().onOrAfter(TransportVersions.ESQL_QUERY_BUILDER_IN_SEARCH_FUNCTIONS)) {
192193
queryBuilder = in.readOptionalNamedWriteable(QueryBuilder.class);
193194
}
194-
Expression options = null;
195-
if (in.getTransportVersion().onOrAfter(TransportVersions.ESQL_MATCH_OPTIONS)) {
196-
options = in.readOptionalNamedWriteable(Expression.class);
197-
}
198-
return new Match(source, field, query, options, queryBuilder);
195+
return new Match(source, field, query, null, queryBuilder);
199196
}
200197

201198
@Override
@@ -206,9 +203,6 @@ public void writeTo(StreamOutput out) throws IOException {
206203
if (out.getTransportVersion().onOrAfter(TransportVersions.ESQL_QUERY_BUILDER_IN_SEARCH_FUNCTIONS)) {
207204
out.writeOptionalNamedWriteable(queryBuilder());
208205
}
209-
if (out.getTransportVersion().onOrAfter(TransportVersions.ESQL_MATCH_OPTIONS)) {
210-
out.writeOptionalNamedWriteable(options());
211-
}
212206
}
213207

214208
@Override

0 commit comments

Comments
 (0)