elasticsearch9 9.0.1__py3-none-any.whl → 9.1.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.
- elasticsearch9/__init__.py +3 -3
- elasticsearch9/_async/client/__init__.py +93 -249
- elasticsearch9/_async/client/async_search.py +4 -4
- elasticsearch9/_async/client/autoscaling.py +4 -4
- elasticsearch9/_async/client/cat.py +620 -58
- elasticsearch9/_async/client/ccr.py +13 -13
- elasticsearch9/_async/client/cluster.py +32 -22
- elasticsearch9/_async/client/connector.py +30 -30
- elasticsearch9/_async/client/dangling_indices.py +3 -3
- elasticsearch9/_async/client/enrich.py +5 -5
- elasticsearch9/_async/client/eql.py +14 -6
- elasticsearch9/_async/client/esql.py +125 -9
- elasticsearch9/_async/client/features.py +2 -2
- elasticsearch9/_async/client/fleet.py +3 -3
- elasticsearch9/_async/client/graph.py +1 -1
- elasticsearch9/_async/client/ilm.py +11 -11
- elasticsearch9/_async/client/indices.py +605 -117
- elasticsearch9/_async/client/inference.py +523 -116
- elasticsearch9/_async/client/ingest.py +9 -16
- elasticsearch9/_async/client/license.py +11 -11
- elasticsearch9/_async/client/logstash.py +3 -3
- elasticsearch9/_async/client/migration.py +3 -3
- elasticsearch9/_async/client/ml.py +75 -87
- elasticsearch9/_async/client/monitoring.py +1 -1
- elasticsearch9/_async/client/nodes.py +7 -7
- elasticsearch9/_async/client/query_rules.py +8 -8
- elasticsearch9/_async/client/rollup.py +9 -30
- elasticsearch9/_async/client/search_application.py +10 -10
- elasticsearch9/_async/client/searchable_snapshots.py +4 -4
- elasticsearch9/_async/client/security.py +79 -81
- elasticsearch9/_async/client/shutdown.py +3 -3
- elasticsearch9/_async/client/simulate.py +1 -1
- elasticsearch9/_async/client/slm.py +9 -9
- elasticsearch9/_async/client/snapshot.py +64 -21
- elasticsearch9/_async/client/sql.py +6 -6
- elasticsearch9/_async/client/ssl.py +1 -1
- elasticsearch9/_async/client/synonyms.py +26 -7
- elasticsearch9/_async/client/tasks.py +4 -4
- elasticsearch9/_async/client/text_structure.py +4 -4
- elasticsearch9/_async/client/transform.py +11 -11
- elasticsearch9/_async/client/watcher.py +17 -15
- elasticsearch9/_async/client/xpack.py +2 -2
- elasticsearch9/_otel.py +8 -8
- elasticsearch9/_sync/client/__init__.py +93 -249
- elasticsearch9/_sync/client/async_search.py +4 -4
- elasticsearch9/_sync/client/autoscaling.py +4 -4
- elasticsearch9/_sync/client/cat.py +620 -58
- elasticsearch9/_sync/client/ccr.py +13 -13
- elasticsearch9/_sync/client/cluster.py +32 -22
- elasticsearch9/_sync/client/connector.py +30 -30
- elasticsearch9/_sync/client/dangling_indices.py +3 -3
- elasticsearch9/_sync/client/enrich.py +5 -5
- elasticsearch9/_sync/client/eql.py +14 -6
- elasticsearch9/_sync/client/esql.py +125 -9
- elasticsearch9/_sync/client/features.py +2 -2
- elasticsearch9/_sync/client/fleet.py +3 -3
- elasticsearch9/_sync/client/graph.py +1 -1
- elasticsearch9/_sync/client/ilm.py +11 -11
- elasticsearch9/_sync/client/indices.py +605 -117
- elasticsearch9/_sync/client/inference.py +523 -116
- elasticsearch9/_sync/client/ingest.py +9 -16
- elasticsearch9/_sync/client/license.py +11 -11
- elasticsearch9/_sync/client/logstash.py +3 -3
- elasticsearch9/_sync/client/migration.py +3 -3
- elasticsearch9/_sync/client/ml.py +75 -87
- elasticsearch9/_sync/client/monitoring.py +1 -1
- elasticsearch9/_sync/client/nodes.py +7 -7
- elasticsearch9/_sync/client/query_rules.py +8 -8
- elasticsearch9/_sync/client/rollup.py +9 -30
- elasticsearch9/_sync/client/search_application.py +10 -10
- elasticsearch9/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch9/_sync/client/security.py +79 -81
- elasticsearch9/_sync/client/shutdown.py +3 -3
- elasticsearch9/_sync/client/simulate.py +1 -1
- elasticsearch9/_sync/client/slm.py +9 -9
- elasticsearch9/_sync/client/snapshot.py +64 -21
- elasticsearch9/_sync/client/sql.py +6 -6
- elasticsearch9/_sync/client/ssl.py +1 -1
- elasticsearch9/_sync/client/synonyms.py +26 -7
- elasticsearch9/_sync/client/tasks.py +4 -4
- elasticsearch9/_sync/client/text_structure.py +4 -4
- elasticsearch9/_sync/client/transform.py +11 -11
- elasticsearch9/_sync/client/watcher.py +17 -15
- elasticsearch9/_sync/client/xpack.py +2 -2
- elasticsearch9/_version.py +1 -1
- elasticsearch9/compat.py +5 -0
- elasticsearch9/dsl/__init__.py +2 -1
- elasticsearch9/dsl/_async/document.py +1 -1
- elasticsearch9/dsl/_sync/document.py +1 -1
- elasticsearch9/dsl/aggs.py +20 -0
- elasticsearch9/dsl/document_base.py +177 -17
- elasticsearch9/dsl/field.py +241 -38
- elasticsearch9/dsl/query.py +50 -5
- elasticsearch9/dsl/response/__init__.py +1 -1
- elasticsearch9/dsl/types.py +245 -21
- elasticsearch9/dsl/utils.py +1 -1
- elasticsearch9/esql/__init__.py +18 -0
- elasticsearch9/esql/esql.py +1105 -0
- elasticsearch9/esql/esql1.py1 +307 -0
- elasticsearch9/esql/functions.py +1738 -0
- {elasticsearch9-9.0.1.dist-info → elasticsearch9-9.1.0.dist-info}/METADATA +3 -6
- elasticsearch9-9.1.0.dist-info/RECORD +164 -0
- elasticsearch9-9.0.1.dist-info/RECORD +0 -162
- elasticsearch9-9.0.1.dist-info/licenses/LICENSE.txt +0 -175
- elasticsearch9-9.0.1.dist-info/licenses/NOTICE.txt +0 -559
- {elasticsearch9-9.0.1.dist-info → elasticsearch9-9.1.0.dist-info}/WHEEL +0 -0
- {elasticsearch9-9.0.1.dist-info → elasticsearch9-9.1.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch9-9.0.1.dist-info → elasticsearch9-9.1.0.dist-info}/licenses/NOTICE +0 -0
elasticsearch9/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:
|
|
@@ -463,7 +469,10 @@ class Object(Field):
|
|
|
463
469
|
if subobjects is not DEFAULT:
|
|
464
470
|
kwargs["subobjects"] = subobjects
|
|
465
471
|
if copy_to is not DEFAULT:
|
|
466
|
-
|
|
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)
|
|
467
476
|
if store is not DEFAULT:
|
|
468
477
|
kwargs["store"] = store
|
|
469
478
|
if meta is not DEFAULT:
|
|
@@ -575,6 +584,7 @@ class AggregateMetricDouble(Field):
|
|
|
575
584
|
"""
|
|
576
585
|
:arg default_metric: (required)
|
|
577
586
|
:arg metrics: (required)
|
|
587
|
+
:arg ignore_malformed:
|
|
578
588
|
:arg time_series_metric:
|
|
579
589
|
:arg meta: Metadata about the field.
|
|
580
590
|
:arg properties:
|
|
@@ -595,6 +605,7 @@ class AggregateMetricDouble(Field):
|
|
|
595
605
|
*args: Any,
|
|
596
606
|
default_metric: Union[str, "DefaultType"] = DEFAULT,
|
|
597
607
|
metrics: Union[Sequence[str], "DefaultType"] = DEFAULT,
|
|
608
|
+
ignore_malformed: Union[bool, "DefaultType"] = DEFAULT,
|
|
598
609
|
time_series_metric: Union[
|
|
599
610
|
Literal["gauge", "counter", "summary", "histogram", "position"],
|
|
600
611
|
"DefaultType",
|
|
@@ -615,6 +626,8 @@ class AggregateMetricDouble(Field):
|
|
|
615
626
|
kwargs["default_metric"] = default_metric
|
|
616
627
|
if metrics is not DEFAULT:
|
|
617
628
|
kwargs["metrics"] = metrics
|
|
629
|
+
if ignore_malformed is not DEFAULT:
|
|
630
|
+
kwargs["ignore_malformed"] = ignore_malformed
|
|
618
631
|
if time_series_metric is not DEFAULT:
|
|
619
632
|
kwargs["time_series_metric"] = time_series_metric
|
|
620
633
|
if meta is not DEFAULT:
|
|
@@ -727,7 +740,10 @@ class Binary(Field):
|
|
|
727
740
|
if doc_values is not DEFAULT:
|
|
728
741
|
kwargs["doc_values"] = doc_values
|
|
729
742
|
if copy_to is not DEFAULT:
|
|
730
|
-
|
|
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)
|
|
731
747
|
if store is not DEFAULT:
|
|
732
748
|
kwargs["store"] = store
|
|
733
749
|
if meta is not DEFAULT:
|
|
@@ -838,7 +854,10 @@ class Boolean(Field):
|
|
|
838
854
|
if doc_values is not DEFAULT:
|
|
839
855
|
kwargs["doc_values"] = doc_values
|
|
840
856
|
if copy_to is not DEFAULT:
|
|
841
|
-
|
|
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)
|
|
842
861
|
if store is not DEFAULT:
|
|
843
862
|
kwargs["store"] = store
|
|
844
863
|
if meta is not DEFAULT:
|
|
@@ -953,7 +972,10 @@ class Byte(Integer):
|
|
|
953
972
|
if doc_values is not DEFAULT:
|
|
954
973
|
kwargs["doc_values"] = doc_values
|
|
955
974
|
if copy_to is not DEFAULT:
|
|
956
|
-
|
|
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)
|
|
957
979
|
if store is not DEFAULT:
|
|
958
980
|
kwargs["store"] = store
|
|
959
981
|
if meta is not DEFAULT:
|
|
@@ -1043,7 +1065,10 @@ class Completion(Field):
|
|
|
1043
1065
|
if doc_values is not DEFAULT:
|
|
1044
1066
|
kwargs["doc_values"] = doc_values
|
|
1045
1067
|
if copy_to is not DEFAULT:
|
|
1046
|
-
|
|
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)
|
|
1047
1072
|
if store is not DEFAULT:
|
|
1048
1073
|
kwargs["store"] = store
|
|
1049
1074
|
if meta is not DEFAULT:
|
|
@@ -1251,7 +1276,10 @@ class Date(Field):
|
|
|
1251
1276
|
if doc_values is not DEFAULT:
|
|
1252
1277
|
kwargs["doc_values"] = doc_values
|
|
1253
1278
|
if copy_to is not DEFAULT:
|
|
1254
|
-
|
|
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)
|
|
1255
1283
|
if store is not DEFAULT:
|
|
1256
1284
|
kwargs["store"] = store
|
|
1257
1285
|
if meta is not DEFAULT:
|
|
@@ -1290,7 +1318,7 @@ class Date(Field):
|
|
|
1290
1318
|
if isinstance(data, datetime):
|
|
1291
1319
|
if self._default_timezone and data.tzinfo is None:
|
|
1292
1320
|
data = data.replace(tzinfo=self._default_timezone)
|
|
1293
|
-
return data
|
|
1321
|
+
return cast(datetime, data)
|
|
1294
1322
|
if isinstance(data, date):
|
|
1295
1323
|
return data
|
|
1296
1324
|
if isinstance(data, int):
|
|
@@ -1376,7 +1404,10 @@ class DateNanos(Field):
|
|
|
1376
1404
|
if doc_values is not DEFAULT:
|
|
1377
1405
|
kwargs["doc_values"] = doc_values
|
|
1378
1406
|
if copy_to is not DEFAULT:
|
|
1379
|
-
|
|
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)
|
|
1380
1411
|
if store is not DEFAULT:
|
|
1381
1412
|
kwargs["store"] = store
|
|
1382
1413
|
if meta is not DEFAULT:
|
|
@@ -1455,7 +1486,10 @@ class DateRange(RangeField):
|
|
|
1455
1486
|
if doc_values is not DEFAULT:
|
|
1456
1487
|
kwargs["doc_values"] = doc_values
|
|
1457
1488
|
if copy_to is not DEFAULT:
|
|
1458
|
-
|
|
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)
|
|
1459
1493
|
if store is not DEFAULT:
|
|
1460
1494
|
kwargs["store"] = store
|
|
1461
1495
|
if meta is not DEFAULT:
|
|
@@ -1658,7 +1692,10 @@ class Double(Float):
|
|
|
1658
1692
|
if doc_values is not DEFAULT:
|
|
1659
1693
|
kwargs["doc_values"] = doc_values
|
|
1660
1694
|
if copy_to is not DEFAULT:
|
|
1661
|
-
|
|
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)
|
|
1662
1699
|
if store is not DEFAULT:
|
|
1663
1700
|
kwargs["store"] = store
|
|
1664
1701
|
if meta is not DEFAULT:
|
|
@@ -1733,7 +1770,10 @@ class DoubleRange(RangeField):
|
|
|
1733
1770
|
if doc_values is not DEFAULT:
|
|
1734
1771
|
kwargs["doc_values"] = doc_values
|
|
1735
1772
|
if copy_to is not DEFAULT:
|
|
1736
|
-
|
|
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)
|
|
1737
1777
|
if store is not DEFAULT:
|
|
1738
1778
|
kwargs["store"] = store
|
|
1739
1779
|
if meta is not DEFAULT:
|
|
@@ -1762,6 +1802,7 @@ class Flattened(Field):
|
|
|
1762
1802
|
:arg null_value:
|
|
1763
1803
|
:arg similarity:
|
|
1764
1804
|
:arg split_queries_on_whitespace:
|
|
1805
|
+
:arg time_series_dimensions:
|
|
1765
1806
|
:arg meta: Metadata about the field.
|
|
1766
1807
|
:arg properties:
|
|
1767
1808
|
:arg ignore_above:
|
|
@@ -1790,6 +1831,7 @@ class Flattened(Field):
|
|
|
1790
1831
|
null_value: Union[str, "DefaultType"] = DEFAULT,
|
|
1791
1832
|
similarity: Union[str, "DefaultType"] = DEFAULT,
|
|
1792
1833
|
split_queries_on_whitespace: Union[bool, "DefaultType"] = DEFAULT,
|
|
1834
|
+
time_series_dimensions: Union[Sequence[str], "DefaultType"] = DEFAULT,
|
|
1793
1835
|
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
1794
1836
|
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
1795
1837
|
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
@@ -1820,6 +1862,8 @@ class Flattened(Field):
|
|
|
1820
1862
|
kwargs["similarity"] = similarity
|
|
1821
1863
|
if split_queries_on_whitespace is not DEFAULT:
|
|
1822
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
|
|
1823
1867
|
if meta is not DEFAULT:
|
|
1824
1868
|
kwargs["meta"] = meta
|
|
1825
1869
|
if properties is not DEFAULT:
|
|
@@ -1892,7 +1936,10 @@ class FloatRange(RangeField):
|
|
|
1892
1936
|
if doc_values is not DEFAULT:
|
|
1893
1937
|
kwargs["doc_values"] = doc_values
|
|
1894
1938
|
if copy_to is not DEFAULT:
|
|
1895
|
-
|
|
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)
|
|
1896
1943
|
if store is not DEFAULT:
|
|
1897
1944
|
kwargs["store"] = store
|
|
1898
1945
|
if meta is not DEFAULT:
|
|
@@ -1918,6 +1965,7 @@ class GeoPoint(Field):
|
|
|
1918
1965
|
:arg index:
|
|
1919
1966
|
:arg on_script_error:
|
|
1920
1967
|
:arg script:
|
|
1968
|
+
:arg time_series_metric:
|
|
1921
1969
|
:arg doc_values:
|
|
1922
1970
|
:arg copy_to:
|
|
1923
1971
|
:arg store:
|
|
@@ -1951,6 +1999,9 @@ class GeoPoint(Field):
|
|
|
1951
1999
|
index: Union[bool, "DefaultType"] = DEFAULT,
|
|
1952
2000
|
on_script_error: Union[Literal["fail", "continue"], "DefaultType"] = DEFAULT,
|
|
1953
2001
|
script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2002
|
+
time_series_metric: Union[
|
|
2003
|
+
Literal["gauge", "counter", "position"], "DefaultType"
|
|
2004
|
+
] = DEFAULT,
|
|
1954
2005
|
doc_values: Union[bool, "DefaultType"] = DEFAULT,
|
|
1955
2006
|
copy_to: Union[
|
|
1956
2007
|
Union[str, "InstrumentedField"],
|
|
@@ -1982,10 +2033,15 @@ class GeoPoint(Field):
|
|
|
1982
2033
|
kwargs["on_script_error"] = on_script_error
|
|
1983
2034
|
if script is not DEFAULT:
|
|
1984
2035
|
kwargs["script"] = script
|
|
2036
|
+
if time_series_metric is not DEFAULT:
|
|
2037
|
+
kwargs["time_series_metric"] = time_series_metric
|
|
1985
2038
|
if doc_values is not DEFAULT:
|
|
1986
2039
|
kwargs["doc_values"] = doc_values
|
|
1987
2040
|
if copy_to is not DEFAULT:
|
|
1988
|
-
|
|
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)
|
|
1989
2045
|
if store is not DEFAULT:
|
|
1990
2046
|
kwargs["store"] = store
|
|
1991
2047
|
if meta is not DEFAULT:
|
|
@@ -2074,7 +2130,10 @@ class GeoShape(Field):
|
|
|
2074
2130
|
if doc_values is not DEFAULT:
|
|
2075
2131
|
kwargs["doc_values"] = doc_values
|
|
2076
2132
|
if copy_to is not DEFAULT:
|
|
2077
|
-
|
|
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)
|
|
2078
2137
|
if store is not DEFAULT:
|
|
2079
2138
|
kwargs["store"] = store
|
|
2080
2139
|
if meta is not DEFAULT:
|
|
@@ -2177,7 +2236,10 @@ class HalfFloat(Float):
|
|
|
2177
2236
|
if doc_values is not DEFAULT:
|
|
2178
2237
|
kwargs["doc_values"] = doc_values
|
|
2179
2238
|
if copy_to is not DEFAULT:
|
|
2180
|
-
|
|
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)
|
|
2181
2243
|
if store is not DEFAULT:
|
|
2182
2244
|
kwargs["store"] = store
|
|
2183
2245
|
if meta is not DEFAULT:
|
|
@@ -2360,7 +2422,10 @@ class IcuCollationKeyword(Field):
|
|
|
2360
2422
|
if doc_values is not DEFAULT:
|
|
2361
2423
|
kwargs["doc_values"] = doc_values
|
|
2362
2424
|
if copy_to is not DEFAULT:
|
|
2363
|
-
|
|
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)
|
|
2364
2429
|
if store is not DEFAULT:
|
|
2365
2430
|
kwargs["store"] = store
|
|
2366
2431
|
if meta is not DEFAULT:
|
|
@@ -2435,7 +2500,10 @@ class IntegerRange(RangeField):
|
|
|
2435
2500
|
if doc_values is not DEFAULT:
|
|
2436
2501
|
kwargs["doc_values"] = doc_values
|
|
2437
2502
|
if copy_to is not DEFAULT:
|
|
2438
|
-
|
|
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)
|
|
2439
2507
|
if store is not DEFAULT:
|
|
2440
2508
|
kwargs["store"] = store
|
|
2441
2509
|
if meta is not DEFAULT:
|
|
@@ -2527,7 +2595,10 @@ class Ip(Field):
|
|
|
2527
2595
|
if doc_values is not DEFAULT:
|
|
2528
2596
|
kwargs["doc_values"] = doc_values
|
|
2529
2597
|
if copy_to is not DEFAULT:
|
|
2530
|
-
|
|
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)
|
|
2531
2602
|
if store is not DEFAULT:
|
|
2532
2603
|
kwargs["store"] = store
|
|
2533
2604
|
if meta is not DEFAULT:
|
|
@@ -2611,7 +2682,10 @@ class IpRange(Field):
|
|
|
2611
2682
|
if doc_values is not DEFAULT:
|
|
2612
2683
|
kwargs["doc_values"] = doc_values
|
|
2613
2684
|
if copy_to is not DEFAULT:
|
|
2614
|
-
|
|
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)
|
|
2615
2689
|
if store is not DEFAULT:
|
|
2616
2690
|
kwargs["store"] = store
|
|
2617
2691
|
if meta is not DEFAULT:
|
|
@@ -2781,7 +2855,10 @@ class Keyword(Field):
|
|
|
2781
2855
|
if doc_values is not DEFAULT:
|
|
2782
2856
|
kwargs["doc_values"] = doc_values
|
|
2783
2857
|
if copy_to is not DEFAULT:
|
|
2784
|
-
|
|
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)
|
|
2785
2862
|
if store is not DEFAULT:
|
|
2786
2863
|
kwargs["store"] = store
|
|
2787
2864
|
if meta is not DEFAULT:
|
|
@@ -2884,7 +2961,10 @@ class Long(Integer):
|
|
|
2884
2961
|
if doc_values is not DEFAULT:
|
|
2885
2962
|
kwargs["doc_values"] = doc_values
|
|
2886
2963
|
if copy_to is not DEFAULT:
|
|
2887
|
-
|
|
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)
|
|
2888
2968
|
if store is not DEFAULT:
|
|
2889
2969
|
kwargs["store"] = store
|
|
2890
2970
|
if meta is not DEFAULT:
|
|
@@ -2959,7 +3039,10 @@ class LongRange(RangeField):
|
|
|
2959
3039
|
if doc_values is not DEFAULT:
|
|
2960
3040
|
kwargs["doc_values"] = doc_values
|
|
2961
3041
|
if copy_to is not DEFAULT:
|
|
2962
|
-
|
|
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)
|
|
2963
3046
|
if store is not DEFAULT:
|
|
2964
3047
|
kwargs["store"] = store
|
|
2965
3048
|
if meta is not DEFAULT:
|
|
@@ -3016,7 +3099,10 @@ class MatchOnlyText(Field):
|
|
|
3016
3099
|
if meta is not DEFAULT:
|
|
3017
3100
|
kwargs["meta"] = meta
|
|
3018
3101
|
if copy_to is not DEFAULT:
|
|
3019
|
-
|
|
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)
|
|
3020
3106
|
super().__init__(*args, **kwargs)
|
|
3021
3107
|
|
|
3022
3108
|
|
|
@@ -3064,7 +3150,10 @@ class Murmur3(Field):
|
|
|
3064
3150
|
if doc_values is not DEFAULT:
|
|
3065
3151
|
kwargs["doc_values"] = doc_values
|
|
3066
3152
|
if copy_to is not DEFAULT:
|
|
3067
|
-
|
|
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)
|
|
3068
3157
|
if store is not DEFAULT:
|
|
3069
3158
|
kwargs["store"] = store
|
|
3070
3159
|
if meta is not DEFAULT:
|
|
@@ -3134,7 +3223,10 @@ class Nested(Object):
|
|
|
3134
3223
|
if include_in_root is not DEFAULT:
|
|
3135
3224
|
kwargs["include_in_root"] = include_in_root
|
|
3136
3225
|
if copy_to is not DEFAULT:
|
|
3137
|
-
|
|
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)
|
|
3138
3230
|
if store is not DEFAULT:
|
|
3139
3231
|
kwargs["store"] = store
|
|
3140
3232
|
if meta is not DEFAULT:
|
|
@@ -3205,7 +3297,10 @@ class Passthrough(Field):
|
|
|
3205
3297
|
if time_series_dimension is not DEFAULT:
|
|
3206
3298
|
kwargs["time_series_dimension"] = time_series_dimension
|
|
3207
3299
|
if copy_to is not DEFAULT:
|
|
3208
|
-
|
|
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)
|
|
3209
3304
|
if store is not DEFAULT:
|
|
3210
3305
|
kwargs["store"] = store
|
|
3211
3306
|
if meta is not DEFAULT:
|
|
@@ -3334,7 +3429,10 @@ class Point(Field):
|
|
|
3334
3429
|
if doc_values is not DEFAULT:
|
|
3335
3430
|
kwargs["doc_values"] = doc_values
|
|
3336
3431
|
if copy_to is not DEFAULT:
|
|
3337
|
-
|
|
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)
|
|
3338
3436
|
if store is not DEFAULT:
|
|
3339
3437
|
kwargs["store"] = store
|
|
3340
3438
|
if meta is not DEFAULT:
|
|
@@ -3452,6 +3550,62 @@ class RankFeatures(Field):
|
|
|
3452
3550
|
super().__init__(*args, **kwargs)
|
|
3453
3551
|
|
|
3454
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
|
+
|
|
3455
3609
|
class ScaledFloat(Float):
|
|
3456
3610
|
"""
|
|
3457
3611
|
:arg null_value:
|
|
@@ -3541,7 +3695,10 @@ class ScaledFloat(Float):
|
|
|
3541
3695
|
if doc_values is not DEFAULT:
|
|
3542
3696
|
kwargs["doc_values"] = doc_values
|
|
3543
3697
|
if copy_to is not DEFAULT:
|
|
3544
|
-
|
|
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)
|
|
3545
3702
|
if store is not DEFAULT:
|
|
3546
3703
|
kwargs["store"] = store
|
|
3547
3704
|
if meta is not DEFAULT:
|
|
@@ -3657,7 +3814,10 @@ class SearchAsYouType(Field):
|
|
|
3657
3814
|
if term_vector is not DEFAULT:
|
|
3658
3815
|
kwargs["term_vector"] = term_vector
|
|
3659
3816
|
if copy_to is not DEFAULT:
|
|
3660
|
-
|
|
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)
|
|
3661
3821
|
if store is not DEFAULT:
|
|
3662
3822
|
kwargs["store"] = store
|
|
3663
3823
|
if meta is not DEFAULT:
|
|
@@ -3689,6 +3849,11 @@ class SemanticText(Field):
|
|
|
3689
3849
|
by using the Update mapping API. Use the Create inference API to
|
|
3690
3850
|
create the endpoint. If not specified, the inference endpoint
|
|
3691
3851
|
defined by inference_id will be used at both index and query time.
|
|
3852
|
+
:arg chunking_settings: Settings for chunking text into smaller
|
|
3853
|
+
passages. If specified, these will override the chunking settings
|
|
3854
|
+
sent in the inference endpoint associated with inference_id. If
|
|
3855
|
+
chunking settings are updated, they will not be applied to
|
|
3856
|
+
existing documents until they are reindexed.
|
|
3692
3857
|
"""
|
|
3693
3858
|
|
|
3694
3859
|
name = "semantic_text"
|
|
@@ -3699,6 +3864,9 @@ class SemanticText(Field):
|
|
|
3699
3864
|
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
3700
3865
|
inference_id: Union[str, "DefaultType"] = DEFAULT,
|
|
3701
3866
|
search_inference_id: Union[str, "DefaultType"] = DEFAULT,
|
|
3867
|
+
chunking_settings: Union[
|
|
3868
|
+
"types.ChunkingSettings", Dict[str, Any], "DefaultType"
|
|
3869
|
+
] = DEFAULT,
|
|
3702
3870
|
**kwargs: Any,
|
|
3703
3871
|
):
|
|
3704
3872
|
if meta is not DEFAULT:
|
|
@@ -3707,6 +3875,8 @@ class SemanticText(Field):
|
|
|
3707
3875
|
kwargs["inference_id"] = inference_id
|
|
3708
3876
|
if search_inference_id is not DEFAULT:
|
|
3709
3877
|
kwargs["search_inference_id"] = search_inference_id
|
|
3878
|
+
if chunking_settings is not DEFAULT:
|
|
3879
|
+
kwargs["chunking_settings"] = chunking_settings
|
|
3710
3880
|
super().__init__(*args, **kwargs)
|
|
3711
3881
|
|
|
3712
3882
|
|
|
@@ -3773,7 +3943,10 @@ class Shape(Field):
|
|
|
3773
3943
|
if doc_values is not DEFAULT:
|
|
3774
3944
|
kwargs["doc_values"] = doc_values
|
|
3775
3945
|
if copy_to is not DEFAULT:
|
|
3776
|
-
|
|
3946
|
+
if isinstance(copy_to, list):
|
|
3947
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
3948
|
+
else:
|
|
3949
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3777
3950
|
if store is not DEFAULT:
|
|
3778
3951
|
kwargs["store"] = store
|
|
3779
3952
|
if meta is not DEFAULT:
|
|
@@ -3876,7 +4049,10 @@ class Short(Integer):
|
|
|
3876
4049
|
if doc_values is not DEFAULT:
|
|
3877
4050
|
kwargs["doc_values"] = doc_values
|
|
3878
4051
|
if copy_to is not DEFAULT:
|
|
3879
|
-
|
|
4052
|
+
if isinstance(copy_to, list):
|
|
4053
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4054
|
+
else:
|
|
4055
|
+
kwargs["copy_to"] = str(copy_to)
|
|
3880
4056
|
if store is not DEFAULT:
|
|
3881
4057
|
kwargs["store"] = store
|
|
3882
4058
|
if meta is not DEFAULT:
|
|
@@ -3896,6 +4072,10 @@ class Short(Integer):
|
|
|
3896
4072
|
|
|
3897
4073
|
class SparseVector(Field):
|
|
3898
4074
|
"""
|
|
4075
|
+
:arg store:
|
|
4076
|
+
:arg index_options: Additional index options for the sparse vector
|
|
4077
|
+
field that controls the token pruning behavior of the sparse
|
|
4078
|
+
vector field.
|
|
3899
4079
|
:arg meta: Metadata about the field.
|
|
3900
4080
|
:arg properties:
|
|
3901
4081
|
:arg ignore_above:
|
|
@@ -3913,6 +4093,10 @@ class SparseVector(Field):
|
|
|
3913
4093
|
def __init__(
|
|
3914
4094
|
self,
|
|
3915
4095
|
*args: Any,
|
|
4096
|
+
store: Union[bool, "DefaultType"] = DEFAULT,
|
|
4097
|
+
index_options: Union[
|
|
4098
|
+
"types.SparseVectorIndexOptions", Dict[str, Any], "DefaultType"
|
|
4099
|
+
] = DEFAULT,
|
|
3916
4100
|
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
3917
4101
|
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3918
4102
|
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
@@ -3925,6 +4109,10 @@ class SparseVector(Field):
|
|
|
3925
4109
|
] = DEFAULT,
|
|
3926
4110
|
**kwargs: Any,
|
|
3927
4111
|
):
|
|
4112
|
+
if store is not DEFAULT:
|
|
4113
|
+
kwargs["store"] = store
|
|
4114
|
+
if index_options is not DEFAULT:
|
|
4115
|
+
kwargs["index_options"] = index_options
|
|
3928
4116
|
if meta is not DEFAULT:
|
|
3929
4117
|
kwargs["meta"] = meta
|
|
3930
4118
|
if properties is not DEFAULT:
|
|
@@ -4060,7 +4248,10 @@ class Text(Field):
|
|
|
4060
4248
|
if term_vector is not DEFAULT:
|
|
4061
4249
|
kwargs["term_vector"] = term_vector
|
|
4062
4250
|
if copy_to is not DEFAULT:
|
|
4063
|
-
|
|
4251
|
+
if isinstance(copy_to, list):
|
|
4252
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4253
|
+
else:
|
|
4254
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4064
4255
|
if store is not DEFAULT:
|
|
4065
4256
|
kwargs["store"] = store
|
|
4066
4257
|
if meta is not DEFAULT:
|
|
@@ -4143,7 +4334,10 @@ class TokenCount(Field):
|
|
|
4143
4334
|
if doc_values is not DEFAULT:
|
|
4144
4335
|
kwargs["doc_values"] = doc_values
|
|
4145
4336
|
if copy_to is not DEFAULT:
|
|
4146
|
-
|
|
4337
|
+
if isinstance(copy_to, list):
|
|
4338
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4339
|
+
else:
|
|
4340
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4147
4341
|
if store is not DEFAULT:
|
|
4148
4342
|
kwargs["store"] = store
|
|
4149
4343
|
if meta is not DEFAULT:
|
|
@@ -4246,7 +4440,10 @@ class UnsignedLong(Field):
|
|
|
4246
4440
|
if doc_values is not DEFAULT:
|
|
4247
4441
|
kwargs["doc_values"] = doc_values
|
|
4248
4442
|
if copy_to is not DEFAULT:
|
|
4249
|
-
|
|
4443
|
+
if isinstance(copy_to, list):
|
|
4444
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4445
|
+
else:
|
|
4446
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4250
4447
|
if store is not DEFAULT:
|
|
4251
4448
|
kwargs["store"] = store
|
|
4252
4449
|
if meta is not DEFAULT:
|
|
@@ -4308,7 +4505,10 @@ class Version(Field):
|
|
|
4308
4505
|
if doc_values is not DEFAULT:
|
|
4309
4506
|
kwargs["doc_values"] = doc_values
|
|
4310
4507
|
if copy_to is not DEFAULT:
|
|
4311
|
-
|
|
4508
|
+
if isinstance(copy_to, list):
|
|
4509
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4510
|
+
else:
|
|
4511
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4312
4512
|
if store is not DEFAULT:
|
|
4313
4513
|
kwargs["store"] = store
|
|
4314
4514
|
if meta is not DEFAULT:
|
|
@@ -4374,7 +4574,10 @@ class Wildcard(Field):
|
|
|
4374
4574
|
if doc_values is not DEFAULT:
|
|
4375
4575
|
kwargs["doc_values"] = doc_values
|
|
4376
4576
|
if copy_to is not DEFAULT:
|
|
4377
|
-
|
|
4577
|
+
if isinstance(copy_to, list):
|
|
4578
|
+
kwargs["copy_to"] = [str(field) for field in copy_to]
|
|
4579
|
+
else:
|
|
4580
|
+
kwargs["copy_to"] = str(copy_to)
|
|
4378
4581
|
if store is not DEFAULT:
|
|
4379
4582
|
kwargs["store"] = store
|
|
4380
4583
|
if meta is not DEFAULT:
|