@@ -437,7 +437,9 @@ def __init__(
437437 doc_class : Union [Type ["InnerDoc" ], "DefaultType" ] = DEFAULT ,
438438 * args : Any ,
439439 enabled : Union [bool , "DefaultType" ] = DEFAULT ,
440- subobjects : Union [bool , "DefaultType" ] = DEFAULT ,
440+ subobjects : Union [
441+ Literal ["true" , "false" , "auto" ], bool , "DefaultType"
442+ ] = DEFAULT ,
441443 copy_to : Union [
442444 Union [str , "InstrumentedField" ],
443445 Sequence [Union [str , "InstrumentedField" ]],
@@ -1092,6 +1094,56 @@ def __init__(
10921094 super ().__init__ (* args , ** kwargs )
10931095
10941096
1097+ class CountedKeyword (Field ):
1098+ """
1099+ :arg index:
1100+ :arg meta: Metadata about the field.
1101+ :arg properties:
1102+ :arg ignore_above:
1103+ :arg dynamic:
1104+ :arg fields:
1105+ :arg synthetic_source_keep:
1106+ """
1107+
1108+ name = "counted_keyword"
1109+ _param_defs = {
1110+ "properties" : {"type" : "field" , "hash" : True },
1111+ "fields" : {"type" : "field" , "hash" : True },
1112+ }
1113+
1114+ def __init__ (
1115+ self ,
1116+ * args : Any ,
1117+ index : Union [bool , "DefaultType" ] = DEFAULT ,
1118+ meta : Union [Mapping [str , str ], "DefaultType" ] = DEFAULT ,
1119+ properties : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
1120+ ignore_above : Union [int , "DefaultType" ] = DEFAULT ,
1121+ dynamic : Union [
1122+ Literal ["strict" , "runtime" , "true" , "false" ], bool , "DefaultType"
1123+ ] = DEFAULT ,
1124+ fields : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
1125+ synthetic_source_keep : Union [
1126+ Literal ["none" , "arrays" , "all" ], "DefaultType"
1127+ ] = DEFAULT ,
1128+ ** kwargs : Any ,
1129+ ):
1130+ if index is not DEFAULT :
1131+ kwargs ["index" ] = index
1132+ if meta is not DEFAULT :
1133+ kwargs ["meta" ] = meta
1134+ if properties is not DEFAULT :
1135+ kwargs ["properties" ] = properties
1136+ if ignore_above is not DEFAULT :
1137+ kwargs ["ignore_above" ] = ignore_above
1138+ if dynamic is not DEFAULT :
1139+ kwargs ["dynamic" ] = dynamic
1140+ if fields is not DEFAULT :
1141+ kwargs ["fields" ] = fields
1142+ if synthetic_source_keep is not DEFAULT :
1143+ kwargs ["synthetic_source_keep" ] = synthetic_source_keep
1144+ super ().__init__ (* args , ** kwargs )
1145+
1146+
10951147class Date (Field ):
10961148 """
10971149 :arg default_timezone: timezone that will be automatically used for tz-naive values
@@ -1101,6 +1153,8 @@ class Date(Field):
11011153 :arg format:
11021154 :arg ignore_malformed:
11031155 :arg index:
1156+ :arg script:
1157+ :arg on_script_error:
11041158 :arg null_value:
11051159 :arg precision_step:
11061160 :arg locale:
@@ -1133,6 +1187,8 @@ def __init__(
11331187 format : Union [str , "DefaultType" ] = DEFAULT ,
11341188 ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
11351189 index : Union [bool , "DefaultType" ] = DEFAULT ,
1190+ script : Union ["types.Script" , Dict [str , Any ], "DefaultType" ] = DEFAULT ,
1191+ on_script_error : Union [Literal ["fail" , "continue" ], "DefaultType" ] = DEFAULT ,
11361192 null_value : Any = DEFAULT ,
11371193 precision_step : Union [int , "DefaultType" ] = DEFAULT ,
11381194 locale : Union [str , "DefaultType" ] = DEFAULT ,
@@ -1165,6 +1221,10 @@ def __init__(
11651221 kwargs ["ignore_malformed" ] = ignore_malformed
11661222 if index is not DEFAULT :
11671223 kwargs ["index" ] = index
1224+ if script is not DEFAULT :
1225+ kwargs ["script" ] = script
1226+ if on_script_error is not DEFAULT :
1227+ kwargs ["on_script_error" ] = on_script_error
11681228 if null_value is not DEFAULT :
11691229 kwargs ["null_value" ] = null_value
11701230 if precision_step is not DEFAULT :
@@ -1229,6 +1289,8 @@ class DateNanos(Field):
12291289 :arg format:
12301290 :arg ignore_malformed:
12311291 :arg index:
1292+ :arg script:
1293+ :arg on_script_error:
12321294 :arg null_value:
12331295 :arg precision_step:
12341296 :arg doc_values:
@@ -1255,6 +1317,8 @@ def __init__(
12551317 format : Union [str , "DefaultType" ] = DEFAULT ,
12561318 ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
12571319 index : Union [bool , "DefaultType" ] = DEFAULT ,
1320+ script : Union ["types.Script" , Dict [str , Any ], "DefaultType" ] = DEFAULT ,
1321+ on_script_error : Union [Literal ["fail" , "continue" ], "DefaultType" ] = DEFAULT ,
12581322 null_value : Any = DEFAULT ,
12591323 precision_step : Union [int , "DefaultType" ] = DEFAULT ,
12601324 doc_values : Union [bool , "DefaultType" ] = DEFAULT ,
@@ -1284,6 +1348,10 @@ def __init__(
12841348 kwargs ["ignore_malformed" ] = ignore_malformed
12851349 if index is not DEFAULT :
12861350 kwargs ["index" ] = index
1351+ if script is not DEFAULT :
1352+ kwargs ["script" ] = script
1353+ if on_script_error is not DEFAULT :
1354+ kwargs ["on_script_error" ] = on_script_error
12871355 if null_value is not DEFAULT :
12881356 kwargs ["null_value" ] = null_value
12891357 if precision_step is not DEFAULT :
@@ -3068,6 +3136,76 @@ def __init__(
30683136 super ().__init__ (* args , ** kwargs )
30693137
30703138
3139+ class Passthrough (Field ):
3140+ """
3141+ :arg enabled:
3142+ :arg priority:
3143+ :arg time_series_dimension:
3144+ :arg copy_to:
3145+ :arg store:
3146+ :arg meta: Metadata about the field.
3147+ :arg properties:
3148+ :arg ignore_above:
3149+ :arg dynamic:
3150+ :arg fields:
3151+ :arg synthetic_source_keep:
3152+ """
3153+
3154+ name = "passthrough"
3155+ _param_defs = {
3156+ "properties" : {"type" : "field" , "hash" : True },
3157+ "fields" : {"type" : "field" , "hash" : True },
3158+ }
3159+
3160+ def __init__ (
3161+ self ,
3162+ * args : Any ,
3163+ enabled : Union [bool , "DefaultType" ] = DEFAULT ,
3164+ priority : Union [int , "DefaultType" ] = DEFAULT ,
3165+ time_series_dimension : Union [bool , "DefaultType" ] = DEFAULT ,
3166+ copy_to : Union [
3167+ Union [str , "InstrumentedField" ],
3168+ Sequence [Union [str , "InstrumentedField" ]],
3169+ "DefaultType" ,
3170+ ] = DEFAULT ,
3171+ store : Union [bool , "DefaultType" ] = DEFAULT ,
3172+ meta : Union [Mapping [str , str ], "DefaultType" ] = DEFAULT ,
3173+ properties : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
3174+ ignore_above : Union [int , "DefaultType" ] = DEFAULT ,
3175+ dynamic : Union [
3176+ Literal ["strict" , "runtime" , "true" , "false" ], bool , "DefaultType"
3177+ ] = DEFAULT ,
3178+ fields : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
3179+ synthetic_source_keep : Union [
3180+ Literal ["none" , "arrays" , "all" ], "DefaultType"
3181+ ] = DEFAULT ,
3182+ ** kwargs : Any ,
3183+ ):
3184+ if enabled is not DEFAULT :
3185+ kwargs ["enabled" ] = enabled
3186+ if priority is not DEFAULT :
3187+ kwargs ["priority" ] = priority
3188+ if time_series_dimension is not DEFAULT :
3189+ kwargs ["time_series_dimension" ] = time_series_dimension
3190+ if copy_to is not DEFAULT :
3191+ kwargs ["copy_to" ] = str (copy_to )
3192+ if store is not DEFAULT :
3193+ kwargs ["store" ] = store
3194+ if meta is not DEFAULT :
3195+ kwargs ["meta" ] = meta
3196+ if properties is not DEFAULT :
3197+ kwargs ["properties" ] = properties
3198+ if ignore_above is not DEFAULT :
3199+ kwargs ["ignore_above" ] = ignore_above
3200+ if dynamic is not DEFAULT :
3201+ kwargs ["dynamic" ] = dynamic
3202+ if fields is not DEFAULT :
3203+ kwargs ["fields" ] = fields
3204+ if synthetic_source_keep is not DEFAULT :
3205+ kwargs ["synthetic_source_keep" ] = synthetic_source_keep
3206+ super ().__init__ (* args , ** kwargs )
3207+
3208+
30713209class Percolator (Field ):
30723210 """
30733211 :arg meta: Metadata about the field.
0 commit comments