@@ -437,7 +437,9 @@ def __init__(
437
437
doc_class : Union [Type ["InnerDoc" ], "DefaultType" ] = DEFAULT ,
438
438
* args : Any ,
439
439
enabled : Union [bool , "DefaultType" ] = DEFAULT ,
440
- subobjects : Union [bool , "DefaultType" ] = DEFAULT ,
440
+ subobjects : Union [
441
+ Literal ["true" , "false" , "auto" ], bool , "DefaultType"
442
+ ] = DEFAULT ,
441
443
copy_to : Union [
442
444
Union [str , "InstrumentedField" ],
443
445
Sequence [Union [str , "InstrumentedField" ]],
@@ -762,6 +764,11 @@ class Boolean(Field):
762
764
:arg fielddata:
763
765
:arg index:
764
766
: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.
765
772
:arg doc_values:
766
773
:arg copy_to:
767
774
:arg store:
@@ -789,6 +796,10 @@ def __init__(
789
796
] = DEFAULT ,
790
797
index : Union [bool , "DefaultType" ] = DEFAULT ,
791
798
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 ,
792
803
doc_values : Union [bool , "DefaultType" ] = DEFAULT ,
793
804
copy_to : Union [
794
805
Union [str , "InstrumentedField" ],
@@ -816,6 +827,14 @@ def __init__(
816
827
kwargs ["index" ] = index
817
828
if null_value is not DEFAULT :
818
829
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
819
838
if doc_values is not DEFAULT :
820
839
kwargs ["doc_values" ] = doc_values
821
840
if copy_to is not DEFAULT :
@@ -1092,6 +1111,56 @@ def __init__(
1092
1111
super ().__init__ (* args , ** kwargs )
1093
1112
1094
1113
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
+
1095
1164
class Date (Field ):
1096
1165
"""
1097
1166
:arg default_timezone: timezone that will be automatically used for tz-naive values
@@ -1101,6 +1170,8 @@ class Date(Field):
1101
1170
:arg format:
1102
1171
:arg ignore_malformed:
1103
1172
:arg index:
1173
+ :arg script:
1174
+ :arg on_script_error:
1104
1175
:arg null_value:
1105
1176
:arg precision_step:
1106
1177
:arg locale:
@@ -1133,6 +1204,8 @@ def __init__(
1133
1204
format : Union [str , "DefaultType" ] = DEFAULT ,
1134
1205
ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
1135
1206
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 ,
1136
1209
null_value : Any = DEFAULT ,
1137
1210
precision_step : Union [int , "DefaultType" ] = DEFAULT ,
1138
1211
locale : Union [str , "DefaultType" ] = DEFAULT ,
@@ -1165,6 +1238,10 @@ def __init__(
1165
1238
kwargs ["ignore_malformed" ] = ignore_malformed
1166
1239
if index is not DEFAULT :
1167
1240
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
1168
1245
if null_value is not DEFAULT :
1169
1246
kwargs ["null_value" ] = null_value
1170
1247
if precision_step is not DEFAULT :
@@ -1229,6 +1306,8 @@ class DateNanos(Field):
1229
1306
:arg format:
1230
1307
:arg ignore_malformed:
1231
1308
:arg index:
1309
+ :arg script:
1310
+ :arg on_script_error:
1232
1311
:arg null_value:
1233
1312
:arg precision_step:
1234
1313
:arg doc_values:
@@ -1255,6 +1334,8 @@ def __init__(
1255
1334
format : Union [str , "DefaultType" ] = DEFAULT ,
1256
1335
ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
1257
1336
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 ,
1258
1339
null_value : Any = DEFAULT ,
1259
1340
precision_step : Union [int , "DefaultType" ] = DEFAULT ,
1260
1341
doc_values : Union [bool , "DefaultType" ] = DEFAULT ,
@@ -1284,6 +1365,10 @@ def __init__(
1284
1365
kwargs ["ignore_malformed" ] = ignore_malformed
1285
1366
if index is not DEFAULT :
1286
1367
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
1287
1372
if null_value is not DEFAULT :
1288
1373
kwargs ["null_value" ] = null_value
1289
1374
if precision_step is not DEFAULT :
@@ -3068,6 +3153,76 @@ def __init__(
3068
3153
super ().__init__ (* args , ** kwargs )
3069
3154
3070
3155
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
+
3071
3226
class Percolator (Field ):
3072
3227
"""
3073
3228
:arg meta: Metadata about the field.
0 commit comments