@@ -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" ]],
@@ -1092,6 +1094,56 @@ def __init__(
1092
1094
super ().__init__ (* args , ** kwargs )
1093
1095
1094
1096
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
+
1095
1147
class Date (Field ):
1096
1148
"""
1097
1149
:arg default_timezone: timezone that will be automatically used for tz-naive values
@@ -1101,6 +1153,8 @@ class Date(Field):
1101
1153
:arg format:
1102
1154
:arg ignore_malformed:
1103
1155
:arg index:
1156
+ :arg script:
1157
+ :arg on_script_error:
1104
1158
:arg null_value:
1105
1159
:arg precision_step:
1106
1160
:arg locale:
@@ -1133,6 +1187,8 @@ def __init__(
1133
1187
format : Union [str , "DefaultType" ] = DEFAULT ,
1134
1188
ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
1135
1189
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 ,
1136
1192
null_value : Any = DEFAULT ,
1137
1193
precision_step : Union [int , "DefaultType" ] = DEFAULT ,
1138
1194
locale : Union [str , "DefaultType" ] = DEFAULT ,
@@ -1165,6 +1221,10 @@ def __init__(
1165
1221
kwargs ["ignore_malformed" ] = ignore_malformed
1166
1222
if index is not DEFAULT :
1167
1223
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
1168
1228
if null_value is not DEFAULT :
1169
1229
kwargs ["null_value" ] = null_value
1170
1230
if precision_step is not DEFAULT :
@@ -1229,6 +1289,8 @@ class DateNanos(Field):
1229
1289
:arg format:
1230
1290
:arg ignore_malformed:
1231
1291
:arg index:
1292
+ :arg script:
1293
+ :arg on_script_error:
1232
1294
:arg null_value:
1233
1295
:arg precision_step:
1234
1296
:arg doc_values:
@@ -1255,6 +1317,8 @@ def __init__(
1255
1317
format : Union [str , "DefaultType" ] = DEFAULT ,
1256
1318
ignore_malformed : Union [bool , "DefaultType" ] = DEFAULT ,
1257
1319
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 ,
1258
1322
null_value : Any = DEFAULT ,
1259
1323
precision_step : Union [int , "DefaultType" ] = DEFAULT ,
1260
1324
doc_values : Union [bool , "DefaultType" ] = DEFAULT ,
@@ -1284,6 +1348,10 @@ def __init__(
1284
1348
kwargs ["ignore_malformed" ] = ignore_malformed
1285
1349
if index is not DEFAULT :
1286
1350
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
1287
1355
if null_value is not DEFAULT :
1288
1356
kwargs ["null_value" ] = null_value
1289
1357
if precision_step is not DEFAULT :
@@ -3068,6 +3136,76 @@ def __init__(
3068
3136
super ().__init__ (* args , ** kwargs )
3069
3137
3070
3138
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
+
3071
3209
class Percolator (Field ):
3072
3210
"""
3073
3211
:arg meta: Metadata about the field.
0 commit comments