|  | @@ -9,6 +9,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  package org.elasticsearch.action.fieldcaps;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import org.elasticsearch.TransportVersion;
 | 
	
		
			
				|  |  |  import org.elasticsearch.TransportVersions;
 | 
	
		
			
				|  |  |  import org.elasticsearch.action.ActionRequestValidationException;
 | 
	
		
			
				|  |  |  import org.elasticsearch.action.IndicesRequest;
 | 
	
	
		
			
				|  | @@ -38,6 +39,8 @@ public final class FieldCapabilitiesRequest extends LegacyActionRequest implemen
 | 
	
		
			
				|  |  |      public static final String NAME = "field_caps_request";
 | 
	
		
			
				|  |  |      public static final IndicesOptions DEFAULT_INDICES_OPTIONS = IndicesOptions.strictExpandOpenAndForbidClosed();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    private static final TransportVersion FIELD_CAPS_ADD_CLUSTER_ALIAS = TransportVersion.fromName("field_caps_add_cluster_alias");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      private String clusterAlias = RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private String[] indices = Strings.EMPTY_ARRAY;
 | 
	
	
		
			
				|  | @@ -70,8 +73,7 @@ public final class FieldCapabilitiesRequest extends LegacyActionRequest implemen
 | 
	
		
			
				|  |  |          if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_13_0)) {
 | 
	
		
			
				|  |  |              includeEmptyFields = in.readBoolean();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if (in.getTransportVersion().onOrAfter(TransportVersions.FIELD_CAPS_ADD_CLUSTER_ALIAS)
 | 
	
		
			
				|  |  | -            || in.getTransportVersion().isPatchFrom(TransportVersions.V_8_19_FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
 | 
	
		
			
				|  |  | +        if (in.getTransportVersion().supports(FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
 | 
	
		
			
				|  |  |              clusterAlias = in.readOptionalString();
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              clusterAlias = RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY;
 | 
	
	
		
			
				|  | @@ -125,8 +127,7 @@ public final class FieldCapabilitiesRequest extends LegacyActionRequest implemen
 | 
	
		
			
				|  |  |          if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_13_0)) {
 | 
	
		
			
				|  |  |              out.writeBoolean(includeEmptyFields);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if (out.getTransportVersion().onOrAfter(TransportVersions.FIELD_CAPS_ADD_CLUSTER_ALIAS)
 | 
	
		
			
				|  |  | -            || out.getTransportVersion().isPatchFrom(TransportVersions.V_8_19_FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
 | 
	
		
			
				|  |  | +        if (out.getTransportVersion().supports(FIELD_CAPS_ADD_CLUSTER_ALIAS)) {
 | 
	
		
			
				|  |  |              out.writeOptionalString(clusterAlias);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 |