@@ -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" ]],
@@ -762,6 +764,11 @@ class Boolean(Field):
762764 :arg fielddata:
763765 :arg index:
764766 :arg null_value:
767+ :arg ignore_malformed:
768+ :arg script:
769+ :arg on_script_error:
770+ :arg time_series_dimension: For internal use by Elastic only. Marks
771+ the field as a time series dimension. Defaults to false.
765772 :arg doc_values:
766773 :arg copy_to:
767774 :arg store:
@@ -789,6 +796,10 @@ def __init__(
789796 ] = DEFAULT ,
790797 index : Union [bool , "DefaultType" ] = DEFAULT ,
791798 null_value : Union [bool , "DefaultType" ] = DEFAULT ,
799+ ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
800+ script : Union ["types.Script" , Dict [str , Any ], "DefaultType" ] = DEFAULT ,
801+ on_script_error : Union [Literal ["fail" , "continue" ], "DefaultType" ] = DEFAULT ,
802+ time_series_dimension : Union [bool , "DefaultType" ] = DEFAULT ,
792803 doc_values : Union [bool , "DefaultType" ] = DEFAULT ,
793804 copy_to : Union [
794805 Union [str , "InstrumentedField" ],
@@ -816,6 +827,14 @@ def __init__(
816827 kwargs ["index" ] = index
817828 if null_value is not DEFAULT :
818829 kwargs ["null_value" ] = null_value
830+ if ignore_malformed is not DEFAULT :
831+ kwargs ["ignore_malformed" ] = ignore_malformed
832+ if script is not DEFAULT :
833+ kwargs ["script" ] = script
834+ if on_script_error is not DEFAULT :
835+ kwargs ["on_script_error" ] = on_script_error
836+ if time_series_dimension is not DEFAULT :
837+ kwargs ["time_series_dimension" ] = time_series_dimension
819838 if doc_values is not DEFAULT :
820839 kwargs ["doc_values" ] = doc_values
821840 if copy_to is not DEFAULT :
@@ -1092,6 +1111,56 @@ def __init__(
10921111 super ().__init__ (* args , ** kwargs )
10931112
10941113
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+
10951164class Date (Field ):
10961165 """
10971166 :arg default_timezone: timezone that will be automatically used for tz-naive values
@@ -1101,6 +1170,8 @@ class Date(Field):
11011170 :arg format:
11021171 :arg ignore_malformed:
11031172 :arg index:
1173+ :arg script:
1174+ :arg on_script_error:
11041175 :arg null_value:
11051176 :arg precision_step:
11061177 :arg locale:
@@ -1133,6 +1204,8 @@ def __init__(
11331204 format : Union [str , "DefaultType" ] = DEFAULT ,
11341205 ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
11351206 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 ,
11361209 null_value : Any = DEFAULT ,
11371210 precision_step : Union [int , "DefaultType" ] = DEFAULT ,
11381211 locale : Union [str , "DefaultType" ] = DEFAULT ,
@@ -1165,6 +1238,10 @@ def __init__(
11651238 kwargs ["ignore_malformed" ] = ignore_malformed
11661239 if index is not DEFAULT :
11671240 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
11681245 if null_value is not DEFAULT :
11691246 kwargs ["null_value" ] = null_value
11701247 if precision_step is not DEFAULT :
@@ -1229,6 +1306,8 @@ class DateNanos(Field):
12291306 :arg format:
12301307 :arg ignore_malformed:
12311308 :arg index:
1309+ :arg script:
1310+ :arg on_script_error:
12321311 :arg null_value:
12331312 :arg precision_step:
12341313 :arg doc_values:
@@ -1255,6 +1334,8 @@ def __init__(
12551334 format : Union [str , "DefaultType" ] = DEFAULT ,
12561335 ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
12571336 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 ,
12581339 null_value : Any = DEFAULT ,
12591340 precision_step : Union [int , "DefaultType" ] = DEFAULT ,
12601341 doc_values : Union [bool , "DefaultType" ] = DEFAULT ,
@@ -1284,6 +1365,10 @@ def __init__(
12841365 kwargs ["ignore_malformed" ] = ignore_malformed
12851366 if index is not DEFAULT :
12861367 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
12871372 if null_value is not DEFAULT :
12881373 kwargs ["null_value" ] = null_value
12891374 if precision_step is not DEFAULT :
@@ -3068,6 +3153,76 @@ def __init__(
30683153 super ().__init__ (* args , ** kwargs )
30693154
30703155
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+
30713226class Percolator (Field ):
30723227 """
30733228 :arg meta: Metadata about the field.
0 commit comments