File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
java/org/elasticsearch/action/search Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 99
1010package org .elasticsearch .action .search ;
1111
12+ import org .elasticsearch .TransportVersion ;
1213import org .elasticsearch .action .ActionRequestValidationException ;
1314import org .elasticsearch .action .CompositeIndicesRequest ;
1415import org .elasticsearch .action .IndicesRequest ;
@@ -62,6 +63,8 @@ public class MultiSearchRequest extends LegacyActionRequest implements Composite
6263 @ Nullable
6364 private String projectRouting ;
6465
66+ private static final TransportVersion MSEARCH_PROJECT_ROUTING = TransportVersion .fromName ("msearch_project_routing" );
67+
6568 public MultiSearchRequest () {}
6669
6770 /**
@@ -141,13 +144,21 @@ public MultiSearchRequest(StreamInput in) throws IOException {
141144 SearchRequest request = new SearchRequest (in );
142145 requests .add (request );
143146 }
147+ if (in .getTransportVersion ().supports (MSEARCH_PROJECT_ROUTING )) {
148+ this .projectRouting = in .readOptionalString ();
149+ } else {
150+ this .projectRouting = null ;
151+ }
144152 }
145153
146154 @ Override
147155 public void writeTo (StreamOutput out ) throws IOException {
148156 super .writeTo (out );
149157 out .writeVInt (maxConcurrentSearchRequests );
150158 out .writeCollection (requests );
159+ if (out .getTransportVersion ().supports (MSEARCH_PROJECT_ROUTING )) {
160+ out .writeOptionalString (this .projectRouting );
161+ }
151162 }
152163
153164 @ Override
Original file line number Diff line number Diff line change 1+ 9234000
Original file line number Diff line number Diff line change 1- ml_inference_nvidia_added,9233000
1+ msearch_project_routing,9234000
You can’t perform that action at this time.
0 commit comments