@@ -165,14 +165,17 @@ private void executeOpenPitCrossProject(
165165 String [] indices = request .indices ();
166166 IndicesOptions originalIndicesOptions = request .indicesOptions ();
167167 // in CPS before executing the open pit request we need to get index resolution and possibly throw based on merged project view
168- // rules. This should happen only if either ignore_unavailable or allow_no_indices is set to false (strict) if instead both are true
169- // we can continue with the "normal" pit execution.
168+ // rules. This should happen only if either ignore_unavailable or allow_no_indices is set to false (strict).
169+ // If instead both are true we can continue with the "normal" pit execution.
170170 if (originalIndicesOptions .ignoreUnavailable () && originalIndicesOptions .allowNoIndices ()) {
171171 // lenient indicesOptions thus execute standard pit
172172 executeOpenPit (task , request , listener );
173173 return ;
174174 }
175+
176+ // ResolvedIndexExpression for the origin cluster (only) as determined by the Security Action Filter
175177 final ResolvedIndexExpressions localResolvedIndexExpressions = request .getResolvedIndexExpressions ();
178+
176179 RemoteClusterService remoteClusterService = searchTransportService .getRemoteClusterService ();
177180 final Map <String , OriginalIndices > indicesPerCluster = remoteClusterService .groupIndices (
178181 indicesOptionsForCrossProjectFanout (originalIndicesOptions ),
@@ -254,7 +257,7 @@ private void executeOpenPitCrossProject(
254257 for (Map .Entry <String , OriginalIndices > remoteClusterIndices : indicesPerCluster .entrySet ()) {
255258 String clusterAlias = remoteClusterIndices .getKey ();
256259 OriginalIndices originalIndices = remoteClusterIndices .getValue ();
257- IndicesOptions relaxedFanoutIdxOptions = originalIndices .indicesOptions (); // form indicesOptionsForCrossProjectFanout
260+ IndicesOptions relaxedFanoutIdxOptions = originalIndices .indicesOptions (); // from indicesOptionsForCrossProjectFanout
258261 ResolveIndexAction .Request remoteRequest = new ResolveIndexAction .Request (originalIndices .indices (), relaxedFanoutIdxOptions );
259262
260263 SubscribableListener <Transport .Connection > connectionListener = new SubscribableListener <>();
0 commit comments