elasticsearch 8.18.0__py3-none-any.whl → 8.19.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +56 -76
- elasticsearch/_async/client/async_search.py +5 -9
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +620 -65
- elasticsearch/_async/client/ccr.py +13 -13
- elasticsearch/_async/client/cluster.py +33 -24
- elasticsearch/_async/client/connector.py +30 -30
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +5 -5
- elasticsearch/_async/client/eql.py +13 -5
- elasticsearch/_async/client/esql.py +38 -9
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +13 -13
- elasticsearch/_async/client/graph.py +1 -1
- elasticsearch/_async/client/ilm.py +11 -11
- elasticsearch/_async/client/indices.py +131 -82
- elasticsearch/_async/client/inference.py +516 -110
- elasticsearch/_async/client/ingest.py +9 -16
- elasticsearch/_async/client/license.py +11 -11
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +81 -93
- elasticsearch/_async/client/nodes.py +9 -8
- elasticsearch/_async/client/query_rules.py +8 -8
- elasticsearch/_async/client/rollup.py +8 -8
- elasticsearch/_async/client/search_application.py +10 -10
- elasticsearch/_async/client/searchable_snapshots.py +4 -4
- elasticsearch/_async/client/security.py +72 -80
- elasticsearch/_async/client/shutdown.py +3 -3
- elasticsearch/_async/client/simulate.py +1 -1
- elasticsearch/_async/client/slm.py +9 -9
- elasticsearch/_async/client/snapshot.py +19 -13
- elasticsearch/_async/client/sql.py +6 -6
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +7 -7
- elasticsearch/_async/client/tasks.py +3 -3
- elasticsearch/_async/client/text_structure.py +4 -4
- elasticsearch/_async/client/transform.py +11 -11
- elasticsearch/_async/client/watcher.py +13 -13
- elasticsearch/_async/client/xpack.py +2 -2
- elasticsearch/_sync/client/__init__.py +56 -76
- elasticsearch/_sync/client/async_search.py +5 -9
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +620 -65
- elasticsearch/_sync/client/ccr.py +13 -13
- elasticsearch/_sync/client/cluster.py +33 -24
- elasticsearch/_sync/client/connector.py +30 -30
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +5 -5
- elasticsearch/_sync/client/eql.py +13 -5
- elasticsearch/_sync/client/esql.py +38 -9
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +13 -13
- elasticsearch/_sync/client/graph.py +1 -1
- elasticsearch/_sync/client/ilm.py +11 -11
- elasticsearch/_sync/client/indices.py +131 -82
- elasticsearch/_sync/client/inference.py +516 -110
- elasticsearch/_sync/client/ingest.py +9 -16
- elasticsearch/_sync/client/license.py +11 -11
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +81 -93
- elasticsearch/_sync/client/nodes.py +9 -8
- elasticsearch/_sync/client/query_rules.py +8 -8
- elasticsearch/_sync/client/rollup.py +8 -8
- elasticsearch/_sync/client/search_application.py +10 -10
- elasticsearch/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch/_sync/client/security.py +72 -80
- elasticsearch/_sync/client/shutdown.py +3 -3
- elasticsearch/_sync/client/simulate.py +1 -1
- elasticsearch/_sync/client/slm.py +9 -9
- elasticsearch/_sync/client/snapshot.py +19 -13
- elasticsearch/_sync/client/sql.py +6 -6
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +7 -7
- elasticsearch/_sync/client/tasks.py +3 -3
- elasticsearch/_sync/client/text_structure.py +4 -4
- elasticsearch/_sync/client/transform.py +11 -11
- elasticsearch/_sync/client/watcher.py +13 -13
- elasticsearch/_sync/client/xpack.py +2 -2
- elasticsearch/_version.py +1 -1
- elasticsearch/compat.py +5 -0
- elasticsearch/dsl/__init__.py +2 -1
- elasticsearch/dsl/_async/document.py +1 -1
- elasticsearch/dsl/_sync/document.py +1 -1
- elasticsearch/dsl/aggs.py +2 -3
- elasticsearch/dsl/document_base.py +176 -16
- elasticsearch/dsl/field.py +361 -38
- elasticsearch/dsl/query.py +55 -4
- elasticsearch/dsl/types.py +151 -22
- elasticsearch/dsl/utils.py +1 -1
- elasticsearch/esql/__init__.py +18 -0
- elasticsearch/esql/esql.py +1105 -0
- elasticsearch/esql/functions.py +1738 -0
- elasticsearch/exceptions.py +2 -0
- {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/METADATA +1 -1
- elasticsearch-8.19.0.dist-info/RECORD +164 -0
- elasticsearch-8.18.0.dist-info/RECORD +0 -161
- {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/WHEEL +0 -0
- {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/licenses/NOTICE +0 -0
elasticsearch/dsl/field.py
CHANGED
|
@@ -280,7 +280,10 @@ class Float(Field):
|
|
|
280
280
|
if doc_values is not DEFAULT:
|
|
281
281
|
kwargs["doc_values"] = doc_values
|
|
282
282
|
if copy_to is not DEFAULT:
|
|
283
|
-
|
|
283
|
+
if isinstance(copy_to, list):
|
|
284
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
285
|
+
else:
|
|
286
|
+
kwargs["copy_to"] = str(copy_to)
|
|
284
287
|
if store is not DEFAULT:
|
|
285
288
|
kwargs["store"] = store
|
|
286
289
|
if meta is not DEFAULT:
|
|
@@ -387,7 +390,10 @@ class Integer(Field):
|
|
|
387
390
|
if doc_values is not DEFAULT:
|
|
388
391
|
kwargs["doc_values"] = doc_values
|
|
389
392
|
if copy_to is not DEFAULT:
|
|
390
|
-
|
|
393
|
+
if isinstance(copy_to, list):
|
|
394
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
395
|
+
else:
|
|
396
|
+
kwargs["copy_to"] = str(copy_to)
|
|
391
397
|
if store is not DEFAULT:
|
|
392
398
|
kwargs["store"] = store
|
|
393
399
|
if meta is not DEFAULT:
|
|
@@ -437,7 +443,9 @@ class Object(Field):
|
|
|
437
443
|
doc_class: Union[Type["InnerDoc"], "DefaultType"] = DEFAULT,
|
|
438
444
|
*args: Any,
|
|
439
445
|
enabled: Union[bool, "DefaultType"] = DEFAULT,
|
|
440
|
-
subobjects: Union[
|
|
446
|
+
subobjects: Union[
|
|
447
|
+
Literal["true", "false", "auto"], bool, "DefaultType"
|
|
448
|
+
] = DEFAULT,
|
|
441
449
|
copy_to: Union[
|
|
442
450
|
Union[str, "InstrumentedField"],
|
|
443
451
|
Sequence[Union[str, "InstrumentedField"]],
|
|
@@ -461,7 +469,10 @@ class Object(Field):
|
|
|
461
469
|
if subobjects is not DEFAULT:
|
|
462
470
|
kwargs["subobjects"] = subobjects
|
|
463
471
|
if copy_to is not DEFAULT:
|
|
464
|
-
|
|
472
|
+
if isinstance(copy_to, list):
|
|
473
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
474
|
+
else:
|
|
475
|
+
kwargs["copy_to"] = str(copy_to)
|
|
465
476
|
if store is not DEFAULT:
|
|
466
477
|
kwargs["store"] = store
|
|
467
478
|
if meta is not DEFAULT:
|
|
@@ -573,6 +584,7 @@ class AggregateMetricDouble(Field):
|
|
|
573
584
|
"""
|
|
574
585
|
:arg default_metric: (required)
|
|
575
586
|
:arg metrics: (required)
|
|
587
|
+
:arg ignore_malformed:
|
|
576
588
|
:arg time_series_metric:
|
|
577
589
|
:arg meta: Metadata about the field.
|
|
578
590
|
:arg properties:
|
|
@@ -593,6 +605,7 @@ class AggregateMetricDouble(Field):
|
|
|
593
605
|
*args: Any,
|
|
594
606
|
default_metric: Union[str, "DefaultType"] = DEFAULT,
|
|
595
607
|
metrics: Union[Sequence[str], "DefaultType"] = DEFAULT,
|
|
608
|
+
ignore_malformed: Union[bool, "DefaultType"] = DEFAULT,
|
|
596
609
|
time_series_metric: Union[
|
|
597
610
|
Literal["gauge", "counter", "summary", "histogram", "position"],
|
|
598
611
|
"DefaultType",
|
|
@@ -613,6 +626,8 @@ class AggregateMetricDouble(Field):
|
|
|
613
626
|
kwargs["default_metric"] = default_metric
|
|
614
627
|
if metrics is not DEFAULT:
|
|
615
628
|
kwargs["metrics"] = metrics
|
|
629
|
+
if ignore_malformed is not DEFAULT:
|
|
630
|
+
kwargs["ignore_malformed"] = ignore_malformed
|
|
616
631
|
if time_series_metric is not DEFAULT:
|
|
617
632
|
kwargs["time_series_metric"] = time_series_metric
|
|
618
633
|
if meta is not DEFAULT:
|
|
@@ -725,7 +740,10 @@ class Binary(Field):
|
|
|
725
740
|
if doc_values is not DEFAULT:
|
|
726
741
|
kwargs["doc_values"] = doc_values
|
|
727
742
|
if copy_to is not DEFAULT:
|
|
728
|
-
|
|
743
|
+
if isinstance(copy_to, list):
|
|
744
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
745
|
+
else:
|
|
746
|
+
kwargs["copy_to"] = str(copy_to)
|
|
729
747
|
if store is not DEFAULT:
|
|
730
748
|
kwargs["store"] = store
|
|
731
749
|
if meta is not DEFAULT:
|
|
@@ -836,7 +854,10 @@ class Boolean(Field):
|
|
|
836
854
|
if doc_values is not DEFAULT:
|
|
837
855
|
kwargs["doc_values"] = doc_values
|
|
838
856
|
if copy_to is not DEFAULT:
|
|
839
|
-
|
|
857
|
+
if isinstance(copy_to, list):
|
|
858
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
859
|
+
else:
|
|
860
|
+
kwargs["copy_to"] = str(copy_to)
|
|
840
861
|
if store is not DEFAULT:
|
|
841
862
|
kwargs["store"] = store
|
|
842
863
|
if meta is not DEFAULT:
|
|
@@ -951,7 +972,10 @@ class Byte(Integer):
|
|
|
951
972
|
if doc_values is not DEFAULT:
|
|
952
973
|
kwargs["doc_values"] = doc_values
|
|
953
974
|
if copy_to is not DEFAULT:
|
|
954
|
-
|
|
975
|
+
if isinstance(copy_to, list):
|
|
976
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
977
|
+
else:
|
|
978
|
+
kwargs["copy_to"] = str(copy_to)
|
|
955
979
|
if store is not DEFAULT:
|
|
956
980
|
kwargs["store"] = store
|
|
957
981
|
if meta is not DEFAULT:
|
|
@@ -1041,7 +1065,10 @@ class Completion(Field):
|
|
|
1041
1065
|
if doc_values is not DEFAULT:
|
|
1042
1066
|
kwargs["doc_values"] = doc_values
|
|
1043
1067
|
if copy_to is not DEFAULT:
|
|
1044
|
-
|
|
1068
|
+
if isinstance(copy_to, list):
|
|
1069
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
1070
|
+
else:
|
|
1071
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1045
1072
|
if store is not DEFAULT:
|
|
1046
1073
|
kwargs["store"] = store
|
|
1047
1074
|
if meta is not DEFAULT:
|
|
@@ -1109,6 +1136,56 @@ class ConstantKeyword(Field):
|
|
|
1109
1136
|
super().__init__(*args, **kwargs)
|
|
1110
1137
|
|
|
1111
1138
|
|
|
1139
|
+
class CountedKeyword(Field):
|
|
1140
|
+
"""
|
|
1141
|
+
:arg index:
|
|
1142
|
+
:arg meta: Metadata about the field.
|
|
1143
|
+
:arg properties:
|
|
1144
|
+
:arg ignore_above:
|
|
1145
|
+
:arg dynamic:
|
|
1146
|
+
:arg fields:
|
|
1147
|
+
:arg synthetic_source_keep:
|
|
1148
|
+
"""
|
|
1149
|
+
|
|
1150
|
+
name = "counted_keyword"
|
|
1151
|
+
_param_defs = {
|
|
1152
|
+
"properties": {"type": "field", "hash": True},
|
|
1153
|
+
"fields": {"type": "field", "hash": True},
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
def __init__(
|
|
1157
|
+
self,
|
|
1158
|
+
*args: Any,
|
|
1159
|
+
index: Union[bool, "DefaultType"] = DEFAULT,
|
|
1160
|
+
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
1161
|
+
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
1162
|
+
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
1163
|
+
dynamic: Union[
|
|
1164
|
+
Literal["strict", "runtime", "true", "false"], bool, "DefaultType"
|
|
1165
|
+
] = DEFAULT,
|
|
1166
|
+
fields: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
1167
|
+
synthetic_source_keep: Union[
|
|
1168
|
+
Literal["none", "arrays", "all"], "DefaultType"
|
|
1169
|
+
] = DEFAULT,
|
|
1170
|
+
**kwargs: Any,
|
|
1171
|
+
):
|
|
1172
|
+
if index is not DEFAULT:
|
|
1173
|
+
kwargs["index"] = index
|
|
1174
|
+
if meta is not DEFAULT:
|
|
1175
|
+
kwargs["meta"] = meta
|
|
1176
|
+
if properties is not DEFAULT:
|
|
1177
|
+
kwargs["properties"] = properties
|
|
1178
|
+
if ignore_above is not DEFAULT:
|
|
1179
|
+
kwargs["ignore_above"] = ignore_above
|
|
1180
|
+
if dynamic is not DEFAULT:
|
|
1181
|
+
kwargs["dynamic"] = dynamic
|
|
1182
|
+
if fields is not DEFAULT:
|
|
1183
|
+
kwargs["fields"] = fields
|
|
1184
|
+
if synthetic_source_keep is not DEFAULT:
|
|
1185
|
+
kwargs["synthetic_source_keep"] = synthetic_source_keep
|
|
1186
|
+
super().__init__(*args, **kwargs)
|
|
1187
|
+
|
|
1188
|
+
|
|
1112
1189
|
class Date(Field):
|
|
1113
1190
|
"""
|
|
1114
1191
|
:arg default_timezone: timezone that will be automatically used for tz-naive values
|
|
@@ -1118,6 +1195,8 @@ class Date(Field):
|
|
|
1118
1195
|
:arg format:
|
|
1119
1196
|
:arg ignore_malformed:
|
|
1120
1197
|
:arg index:
|
|
1198
|
+
:arg script:
|
|
1199
|
+
:arg on_script_error:
|
|
1121
1200
|
:arg null_value:
|
|
1122
1201
|
:arg precision_step:
|
|
1123
1202
|
:arg locale:
|
|
@@ -1150,6 +1229,8 @@ class Date(Field):
|
|
|
1150
1229
|
format: Union[str, "DefaultType"] = DEFAULT,
|
|
1151
1230
|
ignore_malformed: Union[bool, "DefaultType"] = DEFAULT,
|
|
1152
1231
|
index: Union[bool, "DefaultType"] = DEFAULT,
|
|
1232
|
+
script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
1233
|
+
on_script_error: Union[Literal["fail", "continue"], "DefaultType"] = DEFAULT,
|
|
1153
1234
|
null_value: Any = DEFAULT,
|
|
1154
1235
|
precision_step: Union[int, "DefaultType"] = DEFAULT,
|
|
1155
1236
|
locale: Union[str, "DefaultType"] = DEFAULT,
|
|
@@ -1182,6 +1263,10 @@ class Date(Field):
|
|
|
1182
1263
|
kwargs["ignore_malformed"] = ignore_malformed
|
|
1183
1264
|
if index is not DEFAULT:
|
|
1184
1265
|
kwargs["index"] = index
|
|
1266
|
+
if script is not DEFAULT:
|
|
1267
|
+
kwargs["script"] = script
|
|
1268
|
+
if on_script_error is not DEFAULT:
|
|
1269
|
+
kwargs["on_script_error"] = on_script_error
|
|
1185
1270
|
if null_value is not DEFAULT:
|
|
1186
1271
|
kwargs["null_value"] = null_value
|
|
1187
1272
|
if precision_step is not DEFAULT:
|
|
@@ -1191,7 +1276,10 @@ class Date(Field):
|
|
|
1191
1276
|
if doc_values is not DEFAULT:
|
|
1192
1277
|
kwargs["doc_values"] = doc_values
|
|
1193
1278
|
if copy_to is not DEFAULT:
|
|
1194
|
-
|
|
1279
|
+
if isinstance(copy_to, list):
|
|
1280
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
1281
|
+
else:
|
|
1282
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1195
1283
|
if store is not DEFAULT:
|
|
1196
1284
|
kwargs["store"] = store
|
|
1197
1285
|
if meta is not DEFAULT:
|
|
@@ -1230,7 +1318,7 @@ class Date(Field):
|
|
|
1230
1318
|
if isinstance(data, datetime):
|
|
1231
1319
|
if self._default_timezone and data.tzinfo is None:
|
|
1232
1320
|
data = data.replace(tzinfo=self._default_timezone)
|
|
1233
|
-
return data
|
|
1321
|
+
return cast(datetime, data)
|
|
1234
1322
|
if isinstance(data, date):
|
|
1235
1323
|
return data
|
|
1236
1324
|
if isinstance(data, int):
|
|
@@ -1246,6 +1334,8 @@ class DateNanos(Field):
|
|
|
1246
1334
|
:arg format:
|
|
1247
1335
|
:arg ignore_malformed:
|
|
1248
1336
|
:arg index:
|
|
1337
|
+
:arg script:
|
|
1338
|
+
:arg on_script_error:
|
|
1249
1339
|
:arg null_value:
|
|
1250
1340
|
:arg precision_step:
|
|
1251
1341
|
:arg doc_values:
|
|
@@ -1272,6 +1362,8 @@ class DateNanos(Field):
|
|
|
1272
1362
|
format: Union[str, "DefaultType"] = DEFAULT,
|
|
1273
1363
|
ignore_malformed: Union[bool, "DefaultType"] = DEFAULT,
|
|
1274
1364
|
index: Union[bool, "DefaultType"] = DEFAULT,
|
|
1365
|
+
script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
1366
|
+
on_script_error: Union[Literal["fail", "continue"], "DefaultType"] = DEFAULT,
|
|
1275
1367
|
null_value: Any = DEFAULT,
|
|
1276
1368
|
precision_step: Union[int, "DefaultType"] = DEFAULT,
|
|
1277
1369
|
doc_values: Union[bool, "DefaultType"] = DEFAULT,
|
|
@@ -1301,6 +1393,10 @@ class DateNanos(Field):
|
|
|
1301
1393
|
kwargs["ignore_malformed"] = ignore_malformed
|
|
1302
1394
|
if index is not DEFAULT:
|
|
1303
1395
|
kwargs["index"] = index
|
|
1396
|
+
if script is not DEFAULT:
|
|
1397
|
+
kwargs["script"] = script
|
|
1398
|
+
if on_script_error is not DEFAULT:
|
|
1399
|
+
kwargs["on_script_error"] = on_script_error
|
|
1304
1400
|
if null_value is not DEFAULT:
|
|
1305
1401
|
kwargs["null_value"] = null_value
|
|
1306
1402
|
if precision_step is not DEFAULT:
|
|
@@ -1308,7 +1404,10 @@ class DateNanos(Field):
|
|
|
1308
1404
|
if doc_values is not DEFAULT:
|
|
1309
1405
|
kwargs["doc_values"] = doc_values
|
|
1310
1406
|
if copy_to is not DEFAULT:
|
|
1311
|
-
|
|
1407
|
+
if isinstance(copy_to, list):
|
|
1408
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
1409
|
+
else:
|
|
1410
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1312
1411
|
if store is not DEFAULT:
|
|
1313
1412
|
kwargs["store"] = store
|
|
1314
1413
|
if meta is not DEFAULT:
|
|
@@ -1387,7 +1486,10 @@ class DateRange(RangeField):
|
|
|
1387
1486
|
if doc_values is not DEFAULT:
|
|
1388
1487
|
kwargs["doc_values"] = doc_values
|
|
1389
1488
|
if copy_to is not DEFAULT:
|
|
1390
|
-
|
|
1489
|
+
if isinstance(copy_to, list):
|
|
1490
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
1491
|
+
else:
|
|
1492
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1391
1493
|
if store is not DEFAULT:
|
|
1392
1494
|
kwargs["store"] = store
|
|
1393
1495
|
if meta is not DEFAULT:
|
|
@@ -1590,7 +1692,10 @@ class Double(Float):
|
|
|
1590
1692
|
if doc_values is not DEFAULT:
|
|
1591
1693
|
kwargs["doc_values"] = doc_values
|
|
1592
1694
|
if copy_to is not DEFAULT:
|
|
1593
|
-
|
|
1695
|
+
if isinstance(copy_to, list):
|
|
1696
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
1697
|
+
else:
|
|
1698
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1594
1699
|
if store is not DEFAULT:
|
|
1595
1700
|
kwargs["store"] = store
|
|
1596
1701
|
if meta is not DEFAULT:
|
|
@@ -1665,7 +1770,10 @@ class DoubleRange(RangeField):
|
|
|
1665
1770
|
if doc_values is not DEFAULT:
|
|
1666
1771
|
kwargs["doc_values"] = doc_values
|
|
1667
1772
|
if copy_to is not DEFAULT:
|
|
1668
|
-
|
|
1773
|
+
if isinstance(copy_to, list):
|
|
1774
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
1775
|
+
else:
|
|
1776
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1669
1777
|
if store is not DEFAULT:
|
|
1670
1778
|
kwargs["store"] = store
|
|
1671
1779
|
if meta is not DEFAULT:
|
|
@@ -1694,6 +1802,7 @@ class Flattened(Field):
|
|
|
1694
1802
|
:arg null_value:
|
|
1695
1803
|
:arg similarity:
|
|
1696
1804
|
:arg split_queries_on_whitespace:
|
|
1805
|
+
:arg time_series_dimensions:
|
|
1697
1806
|
:arg meta: Metadata about the field.
|
|
1698
1807
|
:arg properties:
|
|
1699
1808
|
:arg ignore_above:
|
|
@@ -1722,6 +1831,7 @@ class Flattened(Field):
|
|
|
1722
1831
|
null_value: Union[str, "DefaultType"] = DEFAULT,
|
|
1723
1832
|
similarity: Union[str, "DefaultType"] = DEFAULT,
|
|
1724
1833
|
split_queries_on_whitespace: Union[bool, "DefaultType"] = DEFAULT,
|
|
1834
|
+
time_series_dimensions: Union[Sequence[str], "DefaultType"] = DEFAULT,
|
|
1725
1835
|
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
1726
1836
|
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
1727
1837
|
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
@@ -1752,6 +1862,8 @@ class Flattened(Field):
|
|
|
1752
1862
|
kwargs["similarity"] = similarity
|
|
1753
1863
|
if split_queries_on_whitespace is not DEFAULT:
|
|
1754
1864
|
kwargs["split_queries_on_whitespace"] = split_queries_on_whitespace
|
|
1865
|
+
if time_series_dimensions is not DEFAULT:
|
|
1866
|
+
kwargs["time_series_dimensions"] = time_series_dimensions
|
|
1755
1867
|
if meta is not DEFAULT:
|
|
1756
1868
|
kwargs["meta"] = meta
|
|
1757
1869
|
if properties is not DEFAULT:
|
|
@@ -1824,7 +1936,10 @@ class FloatRange(RangeField):
|
|
|
1824
1936
|
if doc_values is not DEFAULT:
|
|
1825
1937
|
kwargs["doc_values"] = doc_values
|
|
1826
1938
|
if copy_to is not DEFAULT:
|
|
1827
|
-
|
|
1939
|
+
if isinstance(copy_to, list):
|
|
1940
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
1941
|
+
else:
|
|
1942
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1828
1943
|
if store is not DEFAULT:
|
|
1829
1944
|
kwargs["store"] = store
|
|
1830
1945
|
if meta is not DEFAULT:
|
|
@@ -1850,6 +1965,7 @@ class GeoPoint(Field):
|
|
|
1850
1965
|
:arg index:
|
|
1851
1966
|
:arg on_script_error:
|
|
1852
1967
|
:arg script:
|
|
1968
|
+
:arg time_series_metric:
|
|
1853
1969
|
:arg doc_values:
|
|
1854
1970
|
:arg copy_to:
|
|
1855
1971
|
:arg store:
|
|
@@ -1883,6 +1999,9 @@ class GeoPoint(Field):
|
|
|
1883
1999
|
index: Union[bool, "DefaultType"] = DEFAULT,
|
|
1884
2000
|
on_script_error: Union[Literal["fail", "continue"], "DefaultType"] = DEFAULT,
|
|
1885
2001
|
script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2002
|
+
time_series_metric: Union[
|
|
2003
|
+
Literal["gauge", "counter", "position"], "DefaultType"
|
|
2004
|
+
] = DEFAULT,
|
|
1886
2005
|
doc_values: Union[bool, "DefaultType"] = DEFAULT,
|
|
1887
2006
|
copy_to: Union[
|
|
1888
2007
|
Union[str, "InstrumentedField"],
|
|
@@ -1914,10 +2033,15 @@ class GeoPoint(Field):
|
|
|
1914
2033
|
kwargs["on_script_error"] = on_script_error
|
|
1915
2034
|
if script is not DEFAULT:
|
|
1916
2035
|
kwargs["script"] = script
|
|
2036
|
+
if time_series_metric is not DEFAULT:
|
|
2037
|
+
kwargs["time_series_metric"] = time_series_metric
|
|
1917
2038
|
if doc_values is not DEFAULT:
|
|
1918
2039
|
kwargs["doc_values"] = doc_values
|
|
1919
2040
|
if copy_to is not DEFAULT:
|
|
1920
|
-
|
|
2041
|
+
if isinstance(copy_to, list):
|
|
2042
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2043
|
+
else:
|
|
2044
|
+
kwargs["copy_to"] = str(copy_to)
|
|
1921
2045
|
if store is not DEFAULT:
|
|
1922
2046
|
kwargs["store"] = store
|
|
1923
2047
|
if meta is not DEFAULT:
|
|
@@ -2006,7 +2130,10 @@ class GeoShape(Field):
|
|
|
2006
2130
|
if doc_values is not DEFAULT:
|
|
2007
2131
|
kwargs["doc_values"] = doc_values
|
|
2008
2132
|
if copy_to is not DEFAULT:
|
|
2009
|
-
|
|
2133
|
+
if isinstance(copy_to, list):
|
|
2134
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2135
|
+
else:
|
|
2136
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2010
2137
|
if store is not DEFAULT:
|
|
2011
2138
|
kwargs["store"] = store
|
|
2012
2139
|
if meta is not DEFAULT:
|
|
@@ -2109,7 +2236,10 @@ class HalfFloat(Float):
|
|
|
2109
2236
|
if doc_values is not DEFAULT:
|
|
2110
2237
|
kwargs["doc_values"] = doc_values
|
|
2111
2238
|
if copy_to is not DEFAULT:
|
|
2112
|
-
|
|
2239
|
+
if isinstance(copy_to, list):
|
|
2240
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2241
|
+
else:
|
|
2242
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2113
2243
|
if store is not DEFAULT:
|
|
2114
2244
|
kwargs["store"] = store
|
|
2115
2245
|
if meta is not DEFAULT:
|
|
@@ -2292,7 +2422,10 @@ class IcuCollationKeyword(Field):
|
|
|
2292
2422
|
if doc_values is not DEFAULT:
|
|
2293
2423
|
kwargs["doc_values"] = doc_values
|
|
2294
2424
|
if copy_to is not DEFAULT:
|
|
2295
|
-
|
|
2425
|
+
if isinstance(copy_to, list):
|
|
2426
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2427
|
+
else:
|
|
2428
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2296
2429
|
if store is not DEFAULT:
|
|
2297
2430
|
kwargs["store"] = store
|
|
2298
2431
|
if meta is not DEFAULT:
|
|
@@ -2367,7 +2500,10 @@ class IntegerRange(RangeField):
|
|
|
2367
2500
|
if doc_values is not DEFAULT:
|
|
2368
2501
|
kwargs["doc_values"] = doc_values
|
|
2369
2502
|
if copy_to is not DEFAULT:
|
|
2370
|
-
|
|
2503
|
+
if isinstance(copy_to, list):
|
|
2504
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2505
|
+
else:
|
|
2506
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2371
2507
|
if store is not DEFAULT:
|
|
2372
2508
|
kwargs["store"] = store
|
|
2373
2509
|
if meta is not DEFAULT:
|
|
@@ -2459,7 +2595,10 @@ class Ip(Field):
|
|
|
2459
2595
|
if doc_values is not DEFAULT:
|
|
2460
2596
|
kwargs["doc_values"] = doc_values
|
|
2461
2597
|
if copy_to is not DEFAULT:
|
|
2462
|
-
|
|
2598
|
+
if isinstance(copy_to, list):
|
|
2599
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2600
|
+
else:
|
|
2601
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2463
2602
|
if store is not DEFAULT:
|
|
2464
2603
|
kwargs["store"] = store
|
|
2465
2604
|
if meta is not DEFAULT:
|
|
@@ -2543,7 +2682,10 @@ class IpRange(Field):
|
|
|
2543
2682
|
if doc_values is not DEFAULT:
|
|
2544
2683
|
kwargs["doc_values"] = doc_values
|
|
2545
2684
|
if copy_to is not DEFAULT:
|
|
2546
|
-
|
|
2685
|
+
if isinstance(copy_to, list):
|
|
2686
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2687
|
+
else:
|
|
2688
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2547
2689
|
if store is not DEFAULT:
|
|
2548
2690
|
kwargs["store"] = store
|
|
2549
2691
|
if meta is not DEFAULT:
|
|
@@ -2713,7 +2855,10 @@ class Keyword(Field):
|
|
|
2713
2855
|
if doc_values is not DEFAULT:
|
|
2714
2856
|
kwargs["doc_values"] = doc_values
|
|
2715
2857
|
if copy_to is not DEFAULT:
|
|
2716
|
-
|
|
2858
|
+
if isinstance(copy_to, list):
|
|
2859
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2860
|
+
else:
|
|
2861
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2717
2862
|
if store is not DEFAULT:
|
|
2718
2863
|
kwargs["store"] = store
|
|
2719
2864
|
if meta is not DEFAULT:
|
|
@@ -2816,7 +2961,10 @@ class Long(Integer):
|
|
|
2816
2961
|
if doc_values is not DEFAULT:
|
|
2817
2962
|
kwargs["doc_values"] = doc_values
|
|
2818
2963
|
if copy_to is not DEFAULT:
|
|
2819
|
-
|
|
2964
|
+
if isinstance(copy_to, list):
|
|
2965
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
2966
|
+
else:
|
|
2967
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2820
2968
|
if store is not DEFAULT:
|
|
2821
2969
|
kwargs["store"] = store
|
|
2822
2970
|
if meta is not DEFAULT:
|
|
@@ -2891,7 +3039,10 @@ class LongRange(RangeField):
|
|
|
2891
3039
|
if doc_values is not DEFAULT:
|
|
2892
3040
|
kwargs["doc_values"] = doc_values
|
|
2893
3041
|
if copy_to is not DEFAULT:
|
|
2894
|
-
|
|
3042
|
+
if isinstance(copy_to, list):
|
|
3043
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3044
|
+
else:
|
|
3045
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2895
3046
|
if store is not DEFAULT:
|
|
2896
3047
|
kwargs["store"] = store
|
|
2897
3048
|
if meta is not DEFAULT:
|
|
@@ -2948,7 +3099,10 @@ class MatchOnlyText(Field):
|
|
|
2948
3099
|
if meta is not DEFAULT:
|
|
2949
3100
|
kwargs["meta"] = meta
|
|
2950
3101
|
if copy_to is not DEFAULT:
|
|
2951
|
-
|
|
3102
|
+
if isinstance(copy_to, list):
|
|
3103
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3104
|
+
else:
|
|
3105
|
+
kwargs["copy_to"] = str(copy_to)
|
|
2952
3106
|
super().__init__(*args, **kwargs)
|
|
2953
3107
|
|
|
2954
3108
|
|
|
@@ -2996,7 +3150,10 @@ class Murmur3(Field):
|
|
|
2996
3150
|
if doc_values is not DEFAULT:
|
|
2997
3151
|
kwargs["doc_values"] = doc_values
|
|
2998
3152
|
if copy_to is not DEFAULT:
|
|
2999
|
-
|
|
3153
|
+
if isinstance(copy_to, list):
|
|
3154
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3155
|
+
else:
|
|
3156
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3000
3157
|
if store is not DEFAULT:
|
|
3001
3158
|
kwargs["store"] = store
|
|
3002
3159
|
if meta is not DEFAULT:
|
|
@@ -3066,7 +3223,10 @@ class Nested(Object):
|
|
|
3066
3223
|
if include_in_root is not DEFAULT:
|
|
3067
3224
|
kwargs["include_in_root"] = include_in_root
|
|
3068
3225
|
if copy_to is not DEFAULT:
|
|
3069
|
-
|
|
3226
|
+
if isinstance(copy_to, list):
|
|
3227
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3228
|
+
else:
|
|
3229
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3070
3230
|
if store is not DEFAULT:
|
|
3071
3231
|
kwargs["store"] = store
|
|
3072
3232
|
if meta is not DEFAULT:
|
|
@@ -3085,6 +3245,79 @@ class Nested(Object):
|
|
|
3085
3245
|
super().__init__(*args, **kwargs)
|
|
3086
3246
|
|
|
3087
3247
|
|
|
3248
|
+
class Passthrough(Field):
|
|
3249
|
+
"""
|
|
3250
|
+
:arg enabled:
|
|
3251
|
+
:arg priority:
|
|
3252
|
+
:arg time_series_dimension:
|
|
3253
|
+
:arg copy_to:
|
|
3254
|
+
:arg store:
|
|
3255
|
+
:arg meta: Metadata about the field.
|
|
3256
|
+
:arg properties:
|
|
3257
|
+
:arg ignore_above:
|
|
3258
|
+
:arg dynamic:
|
|
3259
|
+
:arg fields:
|
|
3260
|
+
:arg synthetic_source_keep:
|
|
3261
|
+
"""
|
|
3262
|
+
|
|
3263
|
+
name = "passthrough"
|
|
3264
|
+
_param_defs = {
|
|
3265
|
+
"properties": {"type": "field", "hash": True},
|
|
3266
|
+
"fields": {"type": "field", "hash": True},
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
def __init__(
|
|
3270
|
+
self,
|
|
3271
|
+
*args: Any,
|
|
3272
|
+
enabled: Union[bool, "DefaultType"] = DEFAULT,
|
|
3273
|
+
priority: Union[int, "DefaultType"] = DEFAULT,
|
|
3274
|
+
time_series_dimension: Union[bool, "DefaultType"] = DEFAULT,
|
|
3275
|
+
copy_to: Union[
|
|
3276
|
+
Union[str, "InstrumentedField"],
|
|
3277
|
+
Sequence[Union[str, "InstrumentedField"]],
|
|
3278
|
+
"DefaultType",
|
|
3279
|
+
] = DEFAULT,
|
|
3280
|
+
store: Union[bool, "DefaultType"] = DEFAULT,
|
|
3281
|
+
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
3282
|
+
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3283
|
+
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
3284
|
+
dynamic: Union[
|
|
3285
|
+
Literal["strict", "runtime", "true", "false"], bool, "DefaultType"
|
|
3286
|
+
] = DEFAULT,
|
|
3287
|
+
fields: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3288
|
+
synthetic_source_keep: Union[
|
|
3289
|
+
Literal["none", "arrays", "all"], "DefaultType"
|
|
3290
|
+
] = DEFAULT,
|
|
3291
|
+
**kwargs: Any,
|
|
3292
|
+
):
|
|
3293
|
+
if enabled is not DEFAULT:
|
|
3294
|
+
kwargs["enabled"] = enabled
|
|
3295
|
+
if priority is not DEFAULT:
|
|
3296
|
+
kwargs["priority"] = priority
|
|
3297
|
+
if time_series_dimension is not DEFAULT:
|
|
3298
|
+
kwargs["time_series_dimension"] = time_series_dimension
|
|
3299
|
+
if copy_to is not DEFAULT:
|
|
3300
|
+
if isinstance(copy_to, list):
|
|
3301
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3302
|
+
else:
|
|
3303
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3304
|
+
if store is not DEFAULT:
|
|
3305
|
+
kwargs["store"] = store
|
|
3306
|
+
if meta is not DEFAULT:
|
|
3307
|
+
kwargs["meta"] = meta
|
|
3308
|
+
if properties is not DEFAULT:
|
|
3309
|
+
kwargs["properties"] = properties
|
|
3310
|
+
if ignore_above is not DEFAULT:
|
|
3311
|
+
kwargs["ignore_above"] = ignore_above
|
|
3312
|
+
if dynamic is not DEFAULT:
|
|
3313
|
+
kwargs["dynamic"] = dynamic
|
|
3314
|
+
if fields is not DEFAULT:
|
|
3315
|
+
kwargs["fields"] = fields
|
|
3316
|
+
if synthetic_source_keep is not DEFAULT:
|
|
3317
|
+
kwargs["synthetic_source_keep"] = synthetic_source_keep
|
|
3318
|
+
super().__init__(*args, **kwargs)
|
|
3319
|
+
|
|
3320
|
+
|
|
3088
3321
|
class Percolator(Field):
|
|
3089
3322
|
"""
|
|
3090
3323
|
:arg meta: Metadata about the field.
|
|
@@ -3196,7 +3429,10 @@ class Point(Field):
|
|
|
3196
3429
|
if doc_values is not DEFAULT:
|
|
3197
3430
|
kwargs["doc_values"] = doc_values
|
|
3198
3431
|
if copy_to is not DEFAULT:
|
|
3199
|
-
|
|
3432
|
+
if isinstance(copy_to, list):
|
|
3433
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3434
|
+
else:
|
|
3435
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3200
3436
|
if store is not DEFAULT:
|
|
3201
3437
|
kwargs["store"] = store
|
|
3202
3438
|
if meta is not DEFAULT:
|
|
@@ -3314,6 +3550,62 @@ class RankFeatures(Field):
|
|
|
3314
3550
|
super().__init__(*args, **kwargs)
|
|
3315
3551
|
|
|
3316
3552
|
|
|
3553
|
+
class RankVectors(Field):
|
|
3554
|
+
"""
|
|
3555
|
+
Technical preview
|
|
3556
|
+
|
|
3557
|
+
:arg element_type:
|
|
3558
|
+
:arg dims:
|
|
3559
|
+
:arg meta: Metadata about the field.
|
|
3560
|
+
:arg properties:
|
|
3561
|
+
:arg ignore_above:
|
|
3562
|
+
:arg dynamic:
|
|
3563
|
+
:arg fields:
|
|
3564
|
+
:arg synthetic_source_keep:
|
|
3565
|
+
"""
|
|
3566
|
+
|
|
3567
|
+
name = "rank_vectors"
|
|
3568
|
+
_param_defs = {
|
|
3569
|
+
"properties": {"type": "field", "hash": True},
|
|
3570
|
+
"fields": {"type": "field", "hash": True},
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
def __init__(
|
|
3574
|
+
self,
|
|
3575
|
+
*args: Any,
|
|
3576
|
+
element_type: Union[Literal["byte", "float", "bit"], "DefaultType"] = DEFAULT,
|
|
3577
|
+
dims: Union[int, "DefaultType"] = DEFAULT,
|
|
3578
|
+
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
3579
|
+
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3580
|
+
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
3581
|
+
dynamic: Union[
|
|
3582
|
+
Literal["strict", "runtime", "true", "false"], bool, "DefaultType"
|
|
3583
|
+
] = DEFAULT,
|
|
3584
|
+
fields: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3585
|
+
synthetic_source_keep: Union[
|
|
3586
|
+
Literal["none", "arrays", "all"], "DefaultType"
|
|
3587
|
+
] = DEFAULT,
|
|
3588
|
+
**kwargs: Any,
|
|
3589
|
+
):
|
|
3590
|
+
if element_type is not DEFAULT:
|
|
3591
|
+
kwargs["element_type"] = element_type
|
|
3592
|
+
if dims is not DEFAULT:
|
|
3593
|
+
kwargs["dims"] = dims
|
|
3594
|
+
if meta is not DEFAULT:
|
|
3595
|
+
kwargs["meta"] = meta
|
|
3596
|
+
if properties is not DEFAULT:
|
|
3597
|
+
kwargs["properties"] = properties
|
|
3598
|
+
if ignore_above is not DEFAULT:
|
|
3599
|
+
kwargs["ignore_above"] = ignore_above
|
|
3600
|
+
if dynamic is not DEFAULT:
|
|
3601
|
+
kwargs["dynamic"] = dynamic
|
|
3602
|
+
if fields is not DEFAULT:
|
|
3603
|
+
kwargs["fields"] = fields
|
|
3604
|
+
if synthetic_source_keep is not DEFAULT:
|
|
3605
|
+
kwargs["synthetic_source_keep"] = synthetic_source_keep
|
|
3606
|
+
super().__init__(*args, **kwargs)
|
|
3607
|
+
|
|
3608
|
+
|
|
3317
3609
|
class ScaledFloat(Float):
|
|
3318
3610
|
"""
|
|
3319
3611
|
:arg null_value:
|
|
@@ -3403,7 +3695,10 @@ class ScaledFloat(Float):
|
|
|
3403
3695
|
if doc_values is not DEFAULT:
|
|
3404
3696
|
kwargs["doc_values"] = doc_values
|
|
3405
3697
|
if copy_to is not DEFAULT:
|
|
3406
|
-
|
|
3698
|
+
if isinstance(copy_to, list):
|
|
3699
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3700
|
+
else:
|
|
3701
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3407
3702
|
if store is not DEFAULT:
|
|
3408
3703
|
kwargs["store"] = store
|
|
3409
3704
|
if meta is not DEFAULT:
|
|
@@ -3519,7 +3814,10 @@ class SearchAsYouType(Field):
|
|
|
3519
3814
|
if term_vector is not DEFAULT:
|
|
3520
3815
|
kwargs["term_vector"] = term_vector
|
|
3521
3816
|
if copy_to is not DEFAULT:
|
|
3522
|
-
|
|
3817
|
+
if isinstance(copy_to, list):
|
|
3818
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3819
|
+
else:
|
|
3820
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3523
3821
|
if store is not DEFAULT:
|
|
3524
3822
|
kwargs["store"] = store
|
|
3525
3823
|
if meta is not DEFAULT:
|
|
@@ -3635,7 +3933,10 @@ class Shape(Field):
|
|
|
3635
3933
|
if doc_values is not DEFAULT:
|
|
3636
3934
|
kwargs["doc_values"] = doc_values
|
|
3637
3935
|
if copy_to is not DEFAULT:
|
|
3638
|
-
|
|
3936
|
+
if isinstance(copy_to, list):
|
|
3937
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3938
|
+
else:
|
|
3939
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3639
3940
|
if store is not DEFAULT:
|
|
3640
3941
|
kwargs["store"] = store
|
|
3641
3942
|
if meta is not DEFAULT:
|
|
@@ -3738,7 +4039,10 @@ class Short(Integer):
|
|
|
3738
4039
|
if doc_values is not DEFAULT:
|
|
3739
4040
|
kwargs["doc_values"] = doc_values
|
|
3740
4041
|
if copy_to is not DEFAULT:
|
|
3741
|
-
|
|
4042
|
+
if isinstance(copy_to, list):
|
|
4043
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4044
|
+
else:
|
|
4045
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3742
4046
|
if store is not DEFAULT:
|
|
3743
4047
|
kwargs["store"] = store
|
|
3744
4048
|
if meta is not DEFAULT:
|
|
@@ -3758,6 +4062,7 @@ class Short(Integer):
|
|
|
3758
4062
|
|
|
3759
4063
|
class SparseVector(Field):
|
|
3760
4064
|
"""
|
|
4065
|
+
:arg store:
|
|
3761
4066
|
:arg meta: Metadata about the field.
|
|
3762
4067
|
:arg properties:
|
|
3763
4068
|
:arg ignore_above:
|
|
@@ -3775,6 +4080,7 @@ class SparseVector(Field):
|
|
|
3775
4080
|
def __init__(
|
|
3776
4081
|
self,
|
|
3777
4082
|
*args: Any,
|
|
4083
|
+
store: Union[bool, "DefaultType"] = DEFAULT,
|
|
3778
4084
|
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
3779
4085
|
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3780
4086
|
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
@@ -3787,6 +4093,8 @@ class SparseVector(Field):
|
|
|
3787
4093
|
] = DEFAULT,
|
|
3788
4094
|
**kwargs: Any,
|
|
3789
4095
|
):
|
|
4096
|
+
if store is not DEFAULT:
|
|
4097
|
+
kwargs["store"] = store
|
|
3790
4098
|
if meta is not DEFAULT:
|
|
3791
4099
|
kwargs["meta"] = meta
|
|
3792
4100
|
if properties is not DEFAULT:
|
|
@@ -3922,7 +4230,10 @@ class Text(Field):
|
|
|
3922
4230
|
if term_vector is not DEFAULT:
|
|
3923
4231
|
kwargs["term_vector"] = term_vector
|
|
3924
4232
|
if copy_to is not DEFAULT:
|
|
3925
|
-
|
|
4233
|
+
if isinstance(copy_to, list):
|
|
4234
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4235
|
+
else:
|
|
4236
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3926
4237
|
if store is not DEFAULT:
|
|
3927
4238
|
kwargs["store"] = store
|
|
3928
4239
|
if meta is not DEFAULT:
|
|
@@ -4005,7 +4316,10 @@ class TokenCount(Field):
|
|
|
4005
4316
|
if doc_values is not DEFAULT:
|
|
4006
4317
|
kwargs["doc_values"] = doc_values
|
|
4007
4318
|
if copy_to is not DEFAULT:
|
|
4008
|
-
|
|
4319
|
+
if isinstance(copy_to, list):
|
|
4320
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4321
|
+
else:
|
|
4322
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4009
4323
|
if store is not DEFAULT:
|
|
4010
4324
|
kwargs["store"] = store
|
|
4011
4325
|
if meta is not DEFAULT:
|
|
@@ -4108,7 +4422,10 @@ class UnsignedLong(Field):
|
|
|
4108
4422
|
if doc_values is not DEFAULT:
|
|
4109
4423
|
kwargs["doc_values"] = doc_values
|
|
4110
4424
|
if copy_to is not DEFAULT:
|
|
4111
|
-
|
|
4425
|
+
if isinstance(copy_to, list):
|
|
4426
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4427
|
+
else:
|
|
4428
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4112
4429
|
if store is not DEFAULT:
|
|
4113
4430
|
kwargs["store"] = store
|
|
4114
4431
|
if meta is not DEFAULT:
|
|
@@ -4170,7 +4487,10 @@ class Version(Field):
|
|
|
4170
4487
|
if doc_values is not DEFAULT:
|
|
4171
4488
|
kwargs["doc_values"] = doc_values
|
|
4172
4489
|
if copy_to is not DEFAULT:
|
|
4173
|
-
|
|
4490
|
+
if isinstance(copy_to, list):
|
|
4491
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4492
|
+
else:
|
|
4493
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4174
4494
|
if store is not DEFAULT:
|
|
4175
4495
|
kwargs["store"] = store
|
|
4176
4496
|
if meta is not DEFAULT:
|
|
@@ -4236,7 +4556,10 @@ class Wildcard(Field):
|
|
|
4236
4556
|
if doc_values is not DEFAULT:
|
|
4237
4557
|
kwargs["doc_values"] = doc_values
|
|
4238
4558
|
if copy_to is not DEFAULT:
|
|
4239
|
-
|
|
4559
|
+
if isinstance(copy_to, list):
|
|
4560
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4561
|
+
else:
|
|
4562
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4240
4563
|
if store is not DEFAULT:
|
|
4241
4564
|
kwargs["store"] = store
|
|
4242
4565
|
if meta is not DEFAULT:
|