@@ -52,7 +52,7 @@ public record IndicesOptions(
5252    ConcreteTargetOptions  concreteTargetOptions ,
5353    WildcardOptions  wildcardOptions ,
5454    GatekeeperOptions  gatekeeperOptions ,
55-     ResolutionModeOptions   resolutionModeOptions 
55+     CrossProjectModeOptions   crossProjectModeOptions 
5656) implements  ToXContentFragment  {
5757
5858    public  static  IndicesOptions .Builder  builder () {
@@ -417,37 +417,37 @@ public static Builder builder(GatekeeperOptions gatekeeperOptions) {
417417    }
418418
419419    /** 
420-      * The resolution  mode options are internal-only options that apply on all indices that have been selected by the other Options. These  
421-      * options may contextually change over the lifetime of the request. 
422-      * @param crossProject  determines that the index expression must be resolved for cross-project requests, defaults to false. 
420+      * The cross-project  mode options are internal-only options that apply on all indices that have been selected by the other Options. 
421+      * These  options may contextually change over the lifetime of the request. 
422+      * @param resolveIndexExpression  determines that the index expression must be resolved for cross-project requests, defaults to false. 
423423     */ 
424-     public  record  ResolutionModeOptions (boolean  crossProject ) implements  ToXContentFragment , Writeable  {
424+     public  record  CrossProjectModeOptions (boolean  resolveIndexExpression ) implements  ToXContentFragment , Writeable  {
425425
426-         public  static  final  ResolutionModeOptions  DEFAULT  = new  ResolutionModeOptions (false );
426+         public  static  final  CrossProjectModeOptions  DEFAULT  = new  CrossProjectModeOptions (false );
427427
428428        private  static  final  TransportVersion  INDICES_OPTIONS_RESOLUTION_MODE  = TransportVersion .fromName (
429429            "indices_options_resolution_mode" 
430430        );
431431
432-         private  static  final  String  CROSS_PROJECT_NAME  = "resolve_cross_project " ;
432+         private  static  final  String  INDEX_EXPRESSION_NAME  = "resolve_cross_project_index_expression " ;
433433
434434        @ Override 
435435        public  XContentBuilder  toXContent (XContentBuilder  builder , Params  params ) throws  IOException  {
436-             return  builder .field (CROSS_PROJECT_NAME ,  crossProject );
436+             return  builder .field (INDEX_EXPRESSION_NAME ,  resolveIndexExpression );
437437        }
438438
439439        @ Override 
440440        public  void  writeTo (StreamOutput  out ) throws  IOException  {
441441            if  (out .getTransportVersion ().supports (INDICES_OPTIONS_RESOLUTION_MODE )) {
442-                 out .writeBoolean (crossProject );
442+                 out .writeBoolean (resolveIndexExpression );
443443            }
444444        }
445445
446-         public  static  ResolutionModeOptions  readFrom (StreamInput  in ) throws  IOException  {
446+         public  static  CrossProjectModeOptions  readFrom (StreamInput  in ) throws  IOException  {
447447            if  (in .getTransportVersion ().supports (INDICES_OPTIONS_RESOLUTION_MODE )) {
448-                 return  new  ResolutionModeOptions (in .readBoolean ());
448+                 return  new  CrossProjectModeOptions (in .readBoolean ());
449449            } else  {
450-                 return  ResolutionModeOptions .DEFAULT ;
450+                 return  CrossProjectModeOptions .DEFAULT ;
451451            }
452452        }
453453    }
@@ -503,7 +503,7 @@ private enum Option {
503503        ConcreteTargetOptions .ERROR_WHEN_UNAVAILABLE_TARGETS ,
504504        WildcardOptions .DEFAULT ,
505505        GatekeeperOptions .DEFAULT ,
506-         ResolutionModeOptions .DEFAULT 
506+         CrossProjectModeOptions .DEFAULT 
507507    );
508508
509509    public  static  final  IndicesOptions  STRICT_EXPAND_OPEN  = IndicesOptions .builder ()
@@ -900,8 +900,8 @@ public boolean ignoreThrottled() {
900900    /** 
901901     * @return whether indices will resolve to the cross-project "flat world" expression 
902902     */ 
903-     public  boolean  resolveCrossProject () {
904-         return  resolutionModeOptions ().crossProject ();
903+     public  boolean  resolveCrossProjectIndexExpression () {
904+         return  crossProjectModeOptions ().resolveIndexExpression ();
905905    }
906906
907907    public  void  writeIndicesOptions (StreamOutput  out ) throws  IOException  {
@@ -964,7 +964,7 @@ public void writeIndicesOptions(StreamOutput out) throws IOException {
964964                out .writeByte ((byte ) 0 ); // ordinal 0 (::data selector) 
965965            }
966966        }
967-         out .writeWriteable (resolutionModeOptions );
967+         out .writeWriteable (crossProjectModeOptions );
968968    }
969969
970970    public  static  IndicesOptions  readIndicesOptions (StreamInput  in ) throws  IOException  {
@@ -1017,15 +1017,15 @@ public static IndicesOptions readIndicesOptions(StreamInput in) throws IOExcepti
10171017                : ConcreteTargetOptions .ERROR_WHEN_UNAVAILABLE_TARGETS ,
10181018            wildcardOptions ,
10191019            gatekeeperOptions ,
1020-             ResolutionModeOptions .readFrom (in )
1020+             CrossProjectModeOptions .readFrom (in )
10211021        );
10221022    }
10231023
10241024    public  static  class  Builder  {
10251025        private  ConcreteTargetOptions  concreteTargetOptions ;
10261026        private  WildcardOptions  wildcardOptions ;
10271027        private  GatekeeperOptions  gatekeeperOptions ;
1028-         private  ResolutionModeOptions   resolutionModeOptions ;
1028+         private  CrossProjectModeOptions   crossProjectModeOptions ;
10291029
10301030        Builder () {
10311031            this (DEFAULT );
@@ -1035,7 +1035,7 @@ public static class Builder {
10351035            concreteTargetOptions  = indicesOptions .concreteTargetOptions ;
10361036            wildcardOptions  = indicesOptions .wildcardOptions ;
10371037            gatekeeperOptions  = indicesOptions .gatekeeperOptions ;
1038-             resolutionModeOptions  = indicesOptions .resolutionModeOptions ;
1038+             crossProjectModeOptions  = indicesOptions .crossProjectModeOptions ;
10391039        }
10401040
10411041        public  Builder  concreteTargetOptions (ConcreteTargetOptions  concreteTargetOptions ) {
@@ -1063,13 +1063,13 @@ public Builder gatekeeperOptions(GatekeeperOptions.Builder generalOptions) {
10631063            return  this ;
10641064        }
10651065
1066-         public  Builder  resolutionModeOptions ( ResolutionModeOptions   resolutionModeOptions ) {
1067-             this .resolutionModeOptions  = resolutionModeOptions ;
1066+         public  Builder  crossProjectModeOptions ( CrossProjectModeOptions   crossProjectModeOptions ) {
1067+             this .crossProjectModeOptions  = crossProjectModeOptions ;
10681068            return  this ;
10691069        }
10701070
10711071        public  IndicesOptions  build () {
1072-             return  new  IndicesOptions (concreteTargetOptions , wildcardOptions , gatekeeperOptions , resolutionModeOptions );
1072+             return  new  IndicesOptions (concreteTargetOptions , wildcardOptions , gatekeeperOptions , crossProjectModeOptions );
10731073        }
10741074    }
10751075
@@ -1172,7 +1172,7 @@ public static IndicesOptions fromOptions(
11721172            ignoreUnavailable  ? ConcreteTargetOptions .ALLOW_UNAVAILABLE_TARGETS  : ConcreteTargetOptions .ERROR_WHEN_UNAVAILABLE_TARGETS ,
11731173            wildcards ,
11741174            gatekeeperOptions ,
1175-             ResolutionModeOptions .DEFAULT 
1175+             CrossProjectModeOptions .DEFAULT 
11761176        );
11771177    }
11781178
@@ -1215,7 +1215,7 @@ public static boolean isIndicesOptions(String name) {
12151215            || "ignoreThrottled" .equals (name )
12161216            || WildcardOptions .ALLOW_NO_INDICES .equals (name )
12171217            || "allowNoIndices" .equals (name )
1218-             || ResolutionModeOptions . CROSS_PROJECT_NAME .equals (name );
1218+             || CrossProjectModeOptions . INDEX_EXPRESSION_NAME .equals (name );
12191219    }
12201220
12211221    public  static  IndicesOptions  fromParameters (
@@ -1260,15 +1260,15 @@ public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params par
12601260        concreteTargetOptions .toXContent (builder , params );
12611261        wildcardOptions .toXContent (builder , params );
12621262        gatekeeperOptions .toXContent (builder , params );
1263-         resolutionModeOptions .toXContent (builder , params );
1263+         crossProjectModeOptions .toXContent (builder , params );
12641264        return  builder ;
12651265    }
12661266
12671267    private  static  final  ParseField  EXPAND_WILDCARDS_FIELD  = new  ParseField (WildcardOptions .EXPAND_WILDCARDS );
12681268    private  static  final  ParseField  IGNORE_UNAVAILABLE_FIELD  = new  ParseField (ConcreteTargetOptions .IGNORE_UNAVAILABLE );
12691269    private  static  final  ParseField  IGNORE_THROTTLED_FIELD  = new  ParseField (GatekeeperOptions .IGNORE_THROTTLED ).withAllDeprecated ();
12701270    private  static  final  ParseField  ALLOW_NO_INDICES_FIELD  = new  ParseField (WildcardOptions .ALLOW_NO_INDICES );
1271-     private  static  final  ParseField  RESOLVE_CROSS_PROJECT  = new  ParseField (ResolutionModeOptions . CROSS_PROJECT_NAME );
1271+     private  static  final  ParseField  RESOLVE_CROSS_PROJECT  = new  ParseField (CrossProjectModeOptions . INDEX_EXPRESSION_NAME );
12721272
12731273    public  static  IndicesOptions  fromXContent (XContentParser  parser ) throws  IOException  {
12741274        return  fromXContent (parser , null );
@@ -1281,7 +1281,9 @@ public static IndicesOptions fromXContent(XContentParser parser, @Nullable Indic
12811281            .ignoreThrottled (defaults  != null  && defaults .gatekeeperOptions ().ignoreThrottled ());
12821282        Boolean  allowNoIndices  = defaults  == null  ? null  : defaults .allowNoIndices ();
12831283        Boolean  ignoreUnavailable  = defaults  == null  ? null  : defaults .ignoreUnavailable ();
1284-         boolean  resolveCrossProject  = defaults  == null  ? ResolutionModeOptions .DEFAULT .crossProject () : defaults .resolveCrossProject ();
1284+         boolean  resolveCrossProjectIndexExpression  = defaults  == null 
1285+             ? CrossProjectModeOptions .DEFAULT .resolveIndexExpression ()
1286+             : defaults .resolveCrossProjectIndexExpression ();
12851287        Token  token  = parser .currentToken () == Token .START_OBJECT  ? parser .currentToken () : parser .nextToken ();
12861288        String  currentFieldName  = null ;
12871289        if  (token  != Token .START_OBJECT ) {
@@ -1330,7 +1332,7 @@ public static IndicesOptions fromXContent(XContentParser parser, @Nullable Indic
13301332                } else  if  (IGNORE_THROTTLED_FIELD .match (currentFieldName , parser .getDeprecationHandler ())) {
13311333                    generalOptions .ignoreThrottled (parser .booleanValue ());
13321334                } else  if  (RESOLVE_CROSS_PROJECT .match (currentFieldName , parser .getDeprecationHandler ())) {
1333-                     resolveCrossProject  = parser .booleanValue ();
1335+                     resolveCrossProjectIndexExpression  = parser .booleanValue ();
13341336                } else  {
13351337                    throw  new  ElasticsearchParseException (
13361338                        "could not read indices options. Unexpected index option ["  + currentFieldName  + "]" 
@@ -1361,7 +1363,7 @@ public static IndicesOptions fromXContent(XContentParser parser, @Nullable Indic
13611363            .concreteTargetOptions (new  ConcreteTargetOptions (ignoreUnavailable ))
13621364            .wildcardOptions (wildcards )
13631365            .gatekeeperOptions (generalOptions )
1364-             .resolutionModeOptions (new  ResolutionModeOptions ( resolveCrossProject ))
1366+             .crossProjectModeOptions (new  CrossProjectModeOptions ( resolveCrossProjectIndexExpression ))
13651367            .build ();
13661368    }
13671369
@@ -1523,8 +1525,8 @@ public String toString() {
15231525            + allowSelectors ()
15241526            + ", include_failure_indices=" 
15251527            + includeFailureIndices ()
1526-             + ", resolve_cross_project =" 
1527-             + resolveCrossProject ()
1528+             + ", resolve_cross_project_index_expression =" 
1529+             + resolveCrossProjectIndexExpression ()
15281530            + ']' ;
15291531    }
15301532}
0 commit comments