@@ -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" ]],
@@ -1109,6 +1111,56 @@ def __init__(
11091111 super ().__init__ (* args , ** kwargs )
11101112
11111113
1114+ class CountedKeyword (Field ):
1115+ """
1116+ :arg index:
1117+ :arg meta: Metadata about the field.
1118+ :arg properties:
1119+ :arg ignore_above:
1120+ :arg dynamic:
1121+ :arg fields:
1122+ :arg synthetic_source_keep:
1123+ """
1124+
1125+ name = "counted_keyword"
1126+ _param_defs = {
1127+ "properties" : {"type" : "field" , "hash" : True },
1128+ "fields" : {"type" : "field" , "hash" : True },
1129+ }
1130+
1131+ def __init__ (
1132+ self ,
1133+ * args : Any ,
1134+ index : Union [bool , "DefaultType" ] = DEFAULT ,
1135+ meta : Union [Mapping [str , str ], "DefaultType" ] = DEFAULT ,
1136+ properties : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
1137+ ignore_above : Union [int , "DefaultType" ] = DEFAULT ,
1138+ dynamic : Union [
1139+ Literal ["strict" , "runtime" , "true" , "false" ], bool , "DefaultType"
1140+ ] = DEFAULT ,
1141+ fields : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
1142+ synthetic_source_keep : Union [
1143+ Literal ["none" , "arrays" , "all" ], "DefaultType"
1144+ ] = DEFAULT ,
1145+ ** kwargs : Any ,
1146+ ):
1147+ if index is not DEFAULT :
1148+ kwargs ["index" ] = index
1149+ if meta is not DEFAULT :
1150+ kwargs ["meta" ] = meta
1151+ if properties is not DEFAULT :
1152+ kwargs ["properties" ] = properties
1153+ if ignore_above is not DEFAULT :
1154+ kwargs ["ignore_above" ] = ignore_above
1155+ if dynamic is not DEFAULT :
1156+ kwargs ["dynamic" ] = dynamic
1157+ if fields is not DEFAULT :
1158+ kwargs ["fields" ] = fields
1159+ if synthetic_source_keep is not DEFAULT :
1160+ kwargs ["synthetic_source_keep" ] = synthetic_source_keep
1161+ super ().__init__ (* args , ** kwargs )
1162+
1163+
11121164class Date (Field ):
11131165 """
11141166 :arg default_timezone: timezone that will be automatically used for tz-naive values
@@ -1118,6 +1170,8 @@ class Date(Field):
11181170 :arg format:
11191171 :arg ignore_malformed:
11201172 :arg index:
1173+ :arg script:
1174+ :arg on_script_error:
11211175 :arg null_value:
11221176 :arg precision_step:
11231177 :arg locale:
@@ -1150,6 +1204,8 @@ def __init__(
11501204 format : Union [str , "DefaultType" ] = DEFAULT ,
11511205 ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
11521206 index : Union [bool , "DefaultType" ] = DEFAULT ,
1207+ script : Union ["types.Script" , Dict [str , Any ], "DefaultType" ] = DEFAULT ,
1208+ on_script_error : Union [Literal ["fail" , "continue" ], "DefaultType" ] = DEFAULT ,
11531209 null_value : Any = DEFAULT ,
11541210 precision_step : Union [int , "DefaultType" ] = DEFAULT ,
11551211 locale : Union [str , "DefaultType" ] = DEFAULT ,
@@ -1182,6 +1238,10 @@ def __init__(
11821238 kwargs ["ignore_malformed" ] = ignore_malformed
11831239 if index is not DEFAULT :
11841240 kwargs ["index" ] = index
1241+ if script is not DEFAULT :
1242+ kwargs ["script" ] = script
1243+ if on_script_error is not DEFAULT :
1244+ kwargs ["on_script_error" ] = on_script_error
11851245 if null_value is not DEFAULT :
11861246 kwargs ["null_value" ] = null_value
11871247 if precision_step is not DEFAULT :
@@ -1246,6 +1306,8 @@ class DateNanos(Field):
12461306 :arg format:
12471307 :arg ignore_malformed:
12481308 :arg index:
1309+ :arg script:
1310+ :arg on_script_error:
12491311 :arg null_value:
12501312 :arg precision_step:
12511313 :arg doc_values:
@@ -1272,6 +1334,8 @@ def __init__(
12721334 format : Union [str , "DefaultType" ] = DEFAULT ,
12731335 ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
12741336 index : Union [bool , "DefaultType" ] = DEFAULT ,
1337+ script : Union ["types.Script" , Dict [str , Any ], "DefaultType" ] = DEFAULT ,
1338+ on_script_error : Union [Literal ["fail" , "continue" ], "DefaultType" ] = DEFAULT ,
12751339 null_value : Any = DEFAULT ,
12761340 precision_step : Union [int , "DefaultType" ] = DEFAULT ,
12771341 doc_values : Union [bool , "DefaultType" ] = DEFAULT ,
@@ -1301,6 +1365,10 @@ def __init__(
13011365 kwargs ["ignore_malformed" ] = ignore_malformed
13021366 if index is not DEFAULT :
13031367 kwargs ["index" ] = index
1368+ if script is not DEFAULT :
1369+ kwargs ["script" ] = script
1370+ if on_script_error is not DEFAULT :
1371+ kwargs ["on_script_error" ] = on_script_error
13041372 if null_value is not DEFAULT :
13051373 kwargs ["null_value" ] = null_value
13061374 if precision_step is not DEFAULT :
@@ -3085,6 +3153,76 @@ def __init__(
30853153 super ().__init__ (* args , ** kwargs )
30863154
30873155
3156+ class Passthrough (Field ):
3157+ """
3158+ :arg enabled:
3159+ :arg priority:
3160+ :arg time_series_dimension:
3161+ :arg copy_to:
3162+ :arg store:
3163+ :arg meta: Metadata about the field.
3164+ :arg properties:
3165+ :arg ignore_above:
3166+ :arg dynamic:
3167+ :arg fields:
3168+ :arg synthetic_source_keep:
3169+ """
3170+
3171+ name = "passthrough"
3172+ _param_defs = {
3173+ "properties" : {"type" : "field" , "hash" : True },
3174+ "fields" : {"type" : "field" , "hash" : True },
3175+ }
3176+
3177+ def __init__ (
3178+ self ,
3179+ * args : Any ,
3180+ enabled : Union [bool , "DefaultType" ] = DEFAULT ,
3181+ priority : Union [int , "DefaultType" ] = DEFAULT ,
3182+ time_series_dimension : Union [bool , "DefaultType" ] = DEFAULT ,
3183+ copy_to : Union [
3184+ Union [str , "InstrumentedField" ],
3185+ Sequence [Union [str , "InstrumentedField" ]],
3186+ "DefaultType" ,
3187+ ] = DEFAULT ,
3188+ store : Union [bool , "DefaultType" ] = DEFAULT ,
3189+ meta : Union [Mapping [str , str ], "DefaultType" ] = DEFAULT ,
3190+ properties : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
3191+ ignore_above : Union [int , "DefaultType" ] = DEFAULT ,
3192+ dynamic : Union [
3193+ Literal ["strict" , "runtime" , "true" , "false" ], bool , "DefaultType"
3194+ ] = DEFAULT ,
3195+ fields : Union [Mapping [str , Field ], "DefaultType" ] = DEFAULT ,
3196+ synthetic_source_keep : Union [
3197+ Literal ["none" , "arrays" , "all" ], "DefaultType"
3198+ ] = DEFAULT ,
3199+ ** kwargs : Any ,
3200+ ):
3201+ if enabled is not DEFAULT :
3202+ kwargs ["enabled" ] = enabled
3203+ if priority is not DEFAULT :
3204+ kwargs ["priority" ] = priority
3205+ if time_series_dimension is not DEFAULT :
3206+ kwargs ["time_series_dimension" ] = time_series_dimension
3207+ if copy_to is not DEFAULT :
3208+ kwargs ["copy_to" ] = str (copy_to )
3209+ if store is not DEFAULT :
3210+ kwargs ["store" ] = store
3211+ if meta is not DEFAULT :
3212+ kwargs ["meta" ] = meta
3213+ if properties is not DEFAULT :
3214+ kwargs ["properties" ] = properties
3215+ if ignore_above is not DEFAULT :
3216+ kwargs ["ignore_above" ] = ignore_above
3217+ if dynamic is not DEFAULT :
3218+ kwargs ["dynamic" ] = dynamic
3219+ if fields is not DEFAULT :
3220+ kwargs ["fields" ] = fields
3221+ if synthetic_source_keep is not DEFAULT :
3222+ kwargs ["synthetic_source_keep" ] = synthetic_source_keep
3223+ super ().__init__ (* args , ** kwargs )
3224+
3225+
30883226class Percolator (Field ):
30893227 """
30903228 :arg meta: Metadata about the field.
0 commit comments