elasticsearch 9.0.2__py3-none-any.whl → 9.0.3__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 +42 -198
- elasticsearch/_async/client/cat.py +393 -25
- elasticsearch/_async/client/cluster.py +14 -4
- elasticsearch/_async/client/eql.py +10 -2
- elasticsearch/_async/client/esql.py +17 -4
- elasticsearch/_async/client/indices.py +87 -43
- elasticsearch/_async/client/inference.py +108 -3
- elasticsearch/_async/client/ingest.py +0 -7
- elasticsearch/_async/client/license.py +4 -4
- elasticsearch/_async/client/ml.py +6 -17
- elasticsearch/_async/client/monitoring.py +1 -1
- elasticsearch/_async/client/rollup.py +1 -22
- elasticsearch/_async/client/security.py +11 -17
- elasticsearch/_async/client/snapshot.py +6 -0
- elasticsearch/_async/client/synonyms.py +1 -0
- elasticsearch/_async/client/watcher.py +4 -2
- elasticsearch/_sync/client/__init__.py +42 -198
- elasticsearch/_sync/client/cat.py +393 -25
- elasticsearch/_sync/client/cluster.py +14 -4
- elasticsearch/_sync/client/eql.py +10 -2
- elasticsearch/_sync/client/esql.py +17 -4
- elasticsearch/_sync/client/indices.py +87 -43
- elasticsearch/_sync/client/inference.py +108 -3
- elasticsearch/_sync/client/ingest.py +0 -7
- elasticsearch/_sync/client/license.py +4 -4
- elasticsearch/_sync/client/ml.py +6 -17
- elasticsearch/_sync/client/monitoring.py +1 -1
- elasticsearch/_sync/client/rollup.py +1 -22
- elasticsearch/_sync/client/security.py +11 -17
- elasticsearch/_sync/client/snapshot.py +6 -0
- elasticsearch/_sync/client/synonyms.py +1 -0
- elasticsearch/_sync/client/watcher.py +4 -2
- elasticsearch/_version.py +1 -1
- elasticsearch/compat.py +5 -0
- elasticsearch/dsl/__init__.py +2 -1
- elasticsearch/dsl/document_base.py +176 -16
- elasticsearch/dsl/field.py +222 -47
- elasticsearch/dsl/query.py +7 -4
- elasticsearch/dsl/types.py +105 -80
- elasticsearch/dsl/utils.py +1 -1
- elasticsearch/{dsl/_sync/_sync_check → esql}/__init__.py +2 -0
- elasticsearch/esql/esql.py +1105 -0
- elasticsearch/esql/functions.py +1738 -0
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.3.dist-info}/METADATA +1 -1
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.3.dist-info}/RECORD +48 -52
- elasticsearch/dsl/_sync/_sync_check/document.py +0 -514
- elasticsearch/dsl/_sync/_sync_check/faceted_search.py +0 -50
- elasticsearch/dsl/_sync/_sync_check/index.py +0 -597
- elasticsearch/dsl/_sync/_sync_check/mapping.py +0 -49
- elasticsearch/dsl/_sync/_sync_check/search.py +0 -230
- elasticsearch/dsl/_sync/_sync_check/update_by_query.py +0 -45
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.3.dist-info}/WHEEL +0 -0
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.3.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.3.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:
|
|
@@ -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:
|
|
@@ -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,11 +3849,6 @@ 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.
|
|
3692
|
-
:arg chunking_settings: Settings for chunking text into smaller
|
|
3693
|
-
passages. If specified, these will override the chunking settings
|
|
3694
|
-
sent in the inference endpoint associated with inference_id. If
|
|
3695
|
-
chunking settings are updated, they will not be applied to
|
|
3696
|
-
existing documents until they are reindexed.
|
|
3697
3852
|
"""
|
|
3698
3853
|
|
|
3699
3854
|
name = "semantic_text"
|
|
@@ -3704,9 +3859,6 @@ class SemanticText(Field):
|
|
|
3704
3859
|
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
3705
3860
|
inference_id: Union[str, "DefaultType"] = DEFAULT,
|
|
3706
3861
|
search_inference_id: Union[str, "DefaultType"] = DEFAULT,
|
|
3707
|
-
chunking_settings: Union[
|
|
3708
|
-
"types.ChunkingSettings", Dict[str, Any], "DefaultType"
|
|
3709
|
-
] = DEFAULT,
|
|
3710
3862
|
**kwargs: Any,
|
|
3711
3863
|
):
|
|
3712
3864
|
if meta is not DEFAULT:
|
|
@@ -3715,8 +3867,6 @@ class SemanticText(Field):
|
|
|
3715
3867
|
kwargs["inference_id"] = inference_id
|
|
3716
3868
|
if search_inference_id is not DEFAULT:
|
|
3717
3869
|
kwargs["search_inference_id"] = search_inference_id
|
|
3718
|
-
if chunking_settings is not DEFAULT:
|
|
3719
|
-
kwargs["chunking_settings"] = chunking_settings
|
|
3720
3870
|
super().__init__(*args, **kwargs)
|
|
3721
3871
|
|
|
3722
3872
|
|
|
@@ -3783,7 +3933,10 @@ class Shape(Field):
|
|
|
3783
3933
|
if doc_values is not DEFAULT:
|
|
3784
3934
|
kwargs["doc_values"] = doc_values
|
|
3785
3935
|
if copy_to is not DEFAULT:
|
|
3786
|
-
|
|
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)
|
|
3787
3940
|
if store is not DEFAULT:
|
|
3788
3941
|
kwargs["store"] = store
|
|
3789
3942
|
if meta is not DEFAULT:
|
|
@@ -3886,7 +4039,10 @@ class Short(Integer):
|
|
|
3886
4039
|
if doc_values is not DEFAULT:
|
|
3887
4040
|
kwargs["doc_values"] = doc_values
|
|
3888
4041
|
if copy_to is not DEFAULT:
|
|
3889
|
-
|
|
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)
|
|
3890
4046
|
if store is not DEFAULT:
|
|
3891
4047
|
kwargs["store"] = store
|
|
3892
4048
|
if meta is not DEFAULT:
|
|
@@ -3906,6 +4062,7 @@ class Short(Integer):
|
|
|
3906
4062
|
|
|
3907
4063
|
class SparseVector(Field):
|
|
3908
4064
|
"""
|
|
4065
|
+
:arg store:
|
|
3909
4066
|
:arg meta: Metadata about the field.
|
|
3910
4067
|
:arg properties:
|
|
3911
4068
|
:arg ignore_above:
|
|
@@ -3923,6 +4080,7 @@ class SparseVector(Field):
|
|
|
3923
4080
|
def __init__(
|
|
3924
4081
|
self,
|
|
3925
4082
|
*args: Any,
|
|
4083
|
+
store: Union[bool, "DefaultType"] = DEFAULT,
|
|
3926
4084
|
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
|
|
3927
4085
|
properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3928
4086
|
ignore_above: Union[int, "DefaultType"] = DEFAULT,
|
|
@@ -3935,6 +4093,8 @@ class SparseVector(Field):
|
|
|
3935
4093
|
] = DEFAULT,
|
|
3936
4094
|
**kwargs: Any,
|
|
3937
4095
|
):
|
|
4096
|
+
if store is not DEFAULT:
|
|
4097
|
+
kwargs["store"] = store
|
|
3938
4098
|
if meta is not DEFAULT:
|
|
3939
4099
|
kwargs["meta"] = meta
|
|
3940
4100
|
if properties is not DEFAULT:
|
|
@@ -4070,7 +4230,10 @@ class Text(Field):
|
|
|
4070
4230
|
if term_vector is not DEFAULT:
|
|
4071
4231
|
kwargs["term_vector"] = term_vector
|
|
4072
4232
|
if copy_to is not DEFAULT:
|
|
4073
|
-
|
|
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)
|
|
4074
4237
|
if store is not DEFAULT:
|
|
4075
4238
|
kwargs["store"] = store
|
|
4076
4239
|
if meta is not DEFAULT:
|
|
@@ -4153,7 +4316,10 @@ class TokenCount(Field):
|
|
|
4153
4316
|
if doc_values is not DEFAULT:
|
|
4154
4317
|
kwargs["doc_values"] = doc_values
|
|
4155
4318
|
if copy_to is not DEFAULT:
|
|
4156
|
-
|
|
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)
|
|
4157
4323
|
if store is not DEFAULT:
|
|
4158
4324
|
kwargs["store"] = store
|
|
4159
4325
|
if meta is not DEFAULT:
|
|
@@ -4256,7 +4422,10 @@ class UnsignedLong(Field):
|
|
|
4256
4422
|
if doc_values is not DEFAULT:
|
|
4257
4423
|
kwargs["doc_values"] = doc_values
|
|
4258
4424
|
if copy_to is not DEFAULT:
|
|
4259
|
-
|
|
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)
|
|
4260
4429
|
if store is not DEFAULT:
|
|
4261
4430
|
kwargs["store"] = store
|
|
4262
4431
|
if meta is not DEFAULT:
|
|
@@ -4318,7 +4487,10 @@ class Version(Field):
|
|
|
4318
4487
|
if doc_values is not DEFAULT:
|
|
4319
4488
|
kwargs["doc_values"] = doc_values
|
|
4320
4489
|
if copy_to is not DEFAULT:
|
|
4321
|
-
|
|
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)
|
|
4322
4494
|
if store is not DEFAULT:
|
|
4323
4495
|
kwargs["store"] = store
|
|
4324
4496
|
if meta is not DEFAULT:
|
|
@@ -4384,7 +4556,10 @@ class Wildcard(Field):
|
|
|
4384
4556
|
if doc_values is not DEFAULT:
|
|
4385
4557
|
kwargs["doc_values"] = doc_values
|
|
4386
4558
|
if copy_to is not DEFAULT:
|
|
4387
|
-
|
|
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)
|
|
4388
4563
|
if store is not DEFAULT:
|
|
4389
4564
|
kwargs["store"] = store
|
|
4390
4565
|
if meta is not DEFAULT:
|
elasticsearch/dsl/query.py
CHANGED
|
@@ -1084,7 +1084,7 @@ class Knn(Query):
|
|
|
1084
1084
|
:arg similarity: The minimum similarity for a vector to be considered
|
|
1085
1085
|
a match
|
|
1086
1086
|
:arg rescore_vector: Apply oversampling and rescoring to quantized
|
|
1087
|
-
vectors
|
|
1087
|
+
vectors *
|
|
1088
1088
|
:arg boost: Floating point number used to decrease or increase the
|
|
1089
1089
|
relevance scores of the query. Boost values are relative to the
|
|
1090
1090
|
default value of 1.0. A boost value between 0 and 1.0 decreases
|
|
@@ -2034,8 +2034,9 @@ class Regexp(Query):
|
|
|
2034
2034
|
class Rule(Query):
|
|
2035
2035
|
"""
|
|
2036
2036
|
:arg organic: (required)
|
|
2037
|
-
:arg ruleset_ids: (required)
|
|
2038
2037
|
:arg match_criteria: (required)
|
|
2038
|
+
:arg ruleset_ids:
|
|
2039
|
+
:arg ruleset_id:
|
|
2039
2040
|
:arg boost: Floating point number used to decrease or increase the
|
|
2040
2041
|
relevance scores of the query. Boost values are relative to the
|
|
2041
2042
|
default value of 1.0. A boost value between 0 and 1.0 decreases
|
|
@@ -2053,16 +2054,18 @@ class Rule(Query):
|
|
|
2053
2054
|
self,
|
|
2054
2055
|
*,
|
|
2055
2056
|
organic: Union[Query, "DefaultType"] = DEFAULT,
|
|
2056
|
-
ruleset_ids: Union[Sequence[str], "DefaultType"] = DEFAULT,
|
|
2057
2057
|
match_criteria: Any = DEFAULT,
|
|
2058
|
+
ruleset_ids: Union[str, Sequence[str], "DefaultType"] = DEFAULT,
|
|
2059
|
+
ruleset_id: Union[str, "DefaultType"] = DEFAULT,
|
|
2058
2060
|
boost: Union[float, "DefaultType"] = DEFAULT,
|
|
2059
2061
|
_name: Union[str, "DefaultType"] = DEFAULT,
|
|
2060
2062
|
**kwargs: Any,
|
|
2061
2063
|
):
|
|
2062
2064
|
super().__init__(
|
|
2063
2065
|
organic=organic,
|
|
2064
|
-
ruleset_ids=ruleset_ids,
|
|
2065
2066
|
match_criteria=match_criteria,
|
|
2067
|
+
ruleset_ids=ruleset_ids,
|
|
2068
|
+
ruleset_id=ruleset_id,
|
|
2066
2069
|
boost=boost,
|
|
2067
2070
|
_name=_name,
|
|
2068
2071
|
**kwargs,
|