Skip to content

Commit 24d3dc6

Browse files
committed
Merge remote-tracking branch 'nik9000/search_shards_no_send' into search_shards_no_send
2 parents b1f6dfb + 37bf1e1 commit 24d3dc6

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

server/src/main/java/org/elasticsearch/action/search/SearchShardsRequest.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,14 @@ public void writeTo(StreamOutput out) throws IOException {
7878
super.writeTo(out);
7979
out.writeStringArray(indices);
8080
indicesOptions.writeIndicesOptions(out);
81-
out.writeOptionalNamedWriteable(
82-
query == null || query.supportsVersion(out.getTransportVersion()) ? query :
83-
/*
84-
* The remote node doesn't support the query we're sending. If this were only
85-
* used for _search this could just fail, but for ESQL it's much more convenient
86-
* if it pretends that the query is MatchAll. ESQL will frequently be able to
87-
* perform the document filtering on the data node in its engine. Slowly.
88-
* But correctly.
89-
*/
81+
out.writeOptionalNamedWriteable(query == null || query.supportsVersion(out.getTransportVersion()) ? query :
82+
/*
83+
* The remote node doesn't support the query we're sending. If this were only
84+
* used for _search this could just fail, but for ESQL it's much more convenient
85+
* if it pretends that the query is MatchAll. ESQL will frequently be able to
86+
* perform the document filtering on the data node in its engine. Slowly.
87+
* But correctly.
88+
*/
9089
new MatchAllQueryBuilder());
9190
out.writeOptionalString(routing);
9291
out.writeOptionalString(preference);

0 commit comments

Comments
 (0)