elasticsearch 9.0.1__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.
Files changed (52) hide show
  1. elasticsearch/_async/client/__init__.py +47 -203
  2. elasticsearch/_async/client/cat.py +594 -32
  3. elasticsearch/_async/client/cluster.py +14 -4
  4. elasticsearch/_async/client/eql.py +10 -2
  5. elasticsearch/_async/client/esql.py +17 -4
  6. elasticsearch/_async/client/indices.py +100 -47
  7. elasticsearch/_async/client/inference.py +110 -75
  8. elasticsearch/_async/client/ingest.py +0 -7
  9. elasticsearch/_async/client/license.py +4 -4
  10. elasticsearch/_async/client/ml.py +6 -17
  11. elasticsearch/_async/client/monitoring.py +1 -1
  12. elasticsearch/_async/client/rollup.py +1 -22
  13. elasticsearch/_async/client/security.py +11 -17
  14. elasticsearch/_async/client/snapshot.py +6 -0
  15. elasticsearch/_async/client/synonyms.py +1 -0
  16. elasticsearch/_async/client/watcher.py +4 -2
  17. elasticsearch/_sync/client/__init__.py +47 -203
  18. elasticsearch/_sync/client/cat.py +594 -32
  19. elasticsearch/_sync/client/cluster.py +14 -4
  20. elasticsearch/_sync/client/eql.py +10 -2
  21. elasticsearch/_sync/client/esql.py +17 -4
  22. elasticsearch/_sync/client/indices.py +100 -47
  23. elasticsearch/_sync/client/inference.py +110 -75
  24. elasticsearch/_sync/client/ingest.py +0 -7
  25. elasticsearch/_sync/client/license.py +4 -4
  26. elasticsearch/_sync/client/ml.py +6 -17
  27. elasticsearch/_sync/client/monitoring.py +1 -1
  28. elasticsearch/_sync/client/rollup.py +1 -22
  29. elasticsearch/_sync/client/security.py +11 -17
  30. elasticsearch/_sync/client/snapshot.py +6 -0
  31. elasticsearch/_sync/client/synonyms.py +1 -0
  32. elasticsearch/_sync/client/watcher.py +4 -2
  33. elasticsearch/_version.py +1 -1
  34. elasticsearch/compat.py +5 -0
  35. elasticsearch/dsl/__init__.py +2 -1
  36. elasticsearch/dsl/_async/document.py +1 -1
  37. elasticsearch/dsl/_sync/document.py +1 -1
  38. elasticsearch/dsl/document_base.py +176 -16
  39. elasticsearch/dsl/field.py +223 -38
  40. elasticsearch/dsl/query.py +49 -4
  41. elasticsearch/dsl/types.py +107 -16
  42. elasticsearch/dsl/utils.py +1 -1
  43. elasticsearch/esql/__init__.py +18 -0
  44. elasticsearch/esql/esql.py +1105 -0
  45. elasticsearch/esql/functions.py +1738 -0
  46. {elasticsearch-9.0.1.dist-info → elasticsearch-9.0.3.dist-info}/METADATA +1 -3
  47. {elasticsearch-9.0.1.dist-info → elasticsearch-9.0.3.dist-info}/RECORD +50 -49
  48. elasticsearch-9.0.1.dist-info/licenses/LICENSE.txt +0 -175
  49. elasticsearch-9.0.1.dist-info/licenses/NOTICE.txt +0 -559
  50. {elasticsearch-9.0.1.dist-info → elasticsearch-9.0.3.dist-info}/WHEEL +0 -0
  51. {elasticsearch-9.0.1.dist-info → elasticsearch-9.0.3.dist-info}/licenses/LICENSE +0 -0
  52. {elasticsearch-9.0.1.dist-info → elasticsearch-9.0.3.dist-info}/licenses/NOTICE +0 -0
@@ -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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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
- kwargs["copy_to"] = str(copy_to)
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:
@@ -3773,7 +3933,10 @@ class Shape(Field):
3773
3933
  if doc_values is not DEFAULT:
3774
3934
  kwargs["doc_values"] = doc_values
3775
3935
  if copy_to is not DEFAULT:
3776
- kwargs["copy_to"] = str(copy_to)
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)
3777
3940
  if store is not DEFAULT:
3778
3941
  kwargs["store"] = store
3779
3942
  if meta is not DEFAULT:
@@ -3876,7 +4039,10 @@ class Short(Integer):
3876
4039
  if doc_values is not DEFAULT:
3877
4040
  kwargs["doc_values"] = doc_values
3878
4041
  if copy_to is not DEFAULT:
3879
- kwargs["copy_to"] = str(copy_to)
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)
3880
4046
  if store is not DEFAULT:
3881
4047
  kwargs["store"] = store
3882
4048
  if meta is not DEFAULT:
@@ -3896,6 +4062,7 @@ class Short(Integer):
3896
4062
 
3897
4063
  class SparseVector(Field):
3898
4064
  """
4065
+ :arg store:
3899
4066
  :arg meta: Metadata about the field.
3900
4067
  :arg properties:
3901
4068
  :arg ignore_above:
@@ -3913,6 +4080,7 @@ class SparseVector(Field):
3913
4080
  def __init__(
3914
4081
  self,
3915
4082
  *args: Any,
4083
+ store: Union[bool, "DefaultType"] = DEFAULT,
3916
4084
  meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
3917
4085
  properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
3918
4086
  ignore_above: Union[int, "DefaultType"] = DEFAULT,
@@ -3925,6 +4093,8 @@ class SparseVector(Field):
3925
4093
  ] = DEFAULT,
3926
4094
  **kwargs: Any,
3927
4095
  ):
4096
+ if store is not DEFAULT:
4097
+ kwargs["store"] = store
3928
4098
  if meta is not DEFAULT:
3929
4099
  kwargs["meta"] = meta
3930
4100
  if properties is not DEFAULT:
@@ -4060,7 +4230,10 @@ class Text(Field):
4060
4230
  if term_vector is not DEFAULT:
4061
4231
  kwargs["term_vector"] = term_vector
4062
4232
  if copy_to is not DEFAULT:
4063
- kwargs["copy_to"] = str(copy_to)
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)
4064
4237
  if store is not DEFAULT:
4065
4238
  kwargs["store"] = store
4066
4239
  if meta is not DEFAULT:
@@ -4143,7 +4316,10 @@ class TokenCount(Field):
4143
4316
  if doc_values is not DEFAULT:
4144
4317
  kwargs["doc_values"] = doc_values
4145
4318
  if copy_to is not DEFAULT:
4146
- kwargs["copy_to"] = str(copy_to)
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)
4147
4323
  if store is not DEFAULT:
4148
4324
  kwargs["store"] = store
4149
4325
  if meta is not DEFAULT:
@@ -4246,7 +4422,10 @@ class UnsignedLong(Field):
4246
4422
  if doc_values is not DEFAULT:
4247
4423
  kwargs["doc_values"] = doc_values
4248
4424
  if copy_to is not DEFAULT:
4249
- kwargs["copy_to"] = str(copy_to)
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)
4250
4429
  if store is not DEFAULT:
4251
4430
  kwargs["store"] = store
4252
4431
  if meta is not DEFAULT:
@@ -4308,7 +4487,10 @@ class Version(Field):
4308
4487
  if doc_values is not DEFAULT:
4309
4488
  kwargs["doc_values"] = doc_values
4310
4489
  if copy_to is not DEFAULT:
4311
- kwargs["copy_to"] = str(copy_to)
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)
4312
4494
  if store is not DEFAULT:
4313
4495
  kwargs["store"] = store
4314
4496
  if meta is not DEFAULT:
@@ -4374,7 +4556,10 @@ class Wildcard(Field):
4374
4556
  if doc_values is not DEFAULT:
4375
4557
  kwargs["doc_values"] = doc_values
4376
4558
  if copy_to is not DEFAULT:
4377
- kwargs["copy_to"] = str(copy_to)
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)
4378
4563
  if store is not DEFAULT:
4379
4564
  kwargs["store"] = store
4380
4565
  if meta is not DEFAULT:
@@ -1382,7 +1382,49 @@ class MoreLikeThis(Query):
1382
1382
  min_term_freq: Union[int, "DefaultType"] = DEFAULT,
1383
1383
  min_word_length: Union[int, "DefaultType"] = DEFAULT,
1384
1384
  routing: Union[str, "DefaultType"] = DEFAULT,
1385
- stop_words: Union[str, Sequence[str], "DefaultType"] = DEFAULT,
1385
+ stop_words: Union[
1386
+ Literal[
1387
+ "_arabic_",
1388
+ "_armenian_",
1389
+ "_basque_",
1390
+ "_bengali_",
1391
+ "_brazilian_",
1392
+ "_bulgarian_",
1393
+ "_catalan_",
1394
+ "_cjk_",
1395
+ "_czech_",
1396
+ "_danish_",
1397
+ "_dutch_",
1398
+ "_english_",
1399
+ "_estonian_",
1400
+ "_finnish_",
1401
+ "_french_",
1402
+ "_galician_",
1403
+ "_german_",
1404
+ "_greek_",
1405
+ "_hindi_",
1406
+ "_hungarian_",
1407
+ "_indonesian_",
1408
+ "_irish_",
1409
+ "_italian_",
1410
+ "_latvian_",
1411
+ "_lithuanian_",
1412
+ "_norwegian_",
1413
+ "_persian_",
1414
+ "_portuguese_",
1415
+ "_romanian_",
1416
+ "_russian_",
1417
+ "_serbian_",
1418
+ "_sorani_",
1419
+ "_spanish_",
1420
+ "_swedish_",
1421
+ "_thai_",
1422
+ "_turkish_",
1423
+ "_none_",
1424
+ ],
1425
+ Sequence[str],
1426
+ "DefaultType",
1427
+ ] = DEFAULT,
1386
1428
  unlike: Union[
1387
1429
  Union[str, "types.LikeDocument"],
1388
1430
  Sequence[Union[str, "types.LikeDocument"]],
@@ -1992,8 +2034,9 @@ class Regexp(Query):
1992
2034
  class Rule(Query):
1993
2035
  """
1994
2036
  :arg organic: (required)
1995
- :arg ruleset_ids: (required)
1996
2037
  :arg match_criteria: (required)
2038
+ :arg ruleset_ids:
2039
+ :arg ruleset_id:
1997
2040
  :arg boost: Floating point number used to decrease or increase the
1998
2041
  relevance scores of the query. Boost values are relative to the
1999
2042
  default value of 1.0. A boost value between 0 and 1.0 decreases
@@ -2011,16 +2054,18 @@ class Rule(Query):
2011
2054
  self,
2012
2055
  *,
2013
2056
  organic: Union[Query, "DefaultType"] = DEFAULT,
2014
- ruleset_ids: Union[Sequence[str], "DefaultType"] = DEFAULT,
2015
2057
  match_criteria: Any = DEFAULT,
2058
+ ruleset_ids: Union[str, Sequence[str], "DefaultType"] = DEFAULT,
2059
+ ruleset_id: Union[str, "DefaultType"] = DEFAULT,
2016
2060
  boost: Union[float, "DefaultType"] = DEFAULT,
2017
2061
  _name: Union[str, "DefaultType"] = DEFAULT,
2018
2062
  **kwargs: Any,
2019
2063
  ):
2020
2064
  super().__init__(
2021
2065
  organic=organic,
2022
- ruleset_ids=ruleset_ids,
2023
2066
  match_criteria=match_criteria,
2067
+ ruleset_ids=ruleset_ids,
2068
+ ruleset_id=ruleset_id,
2024
2069
  boost=boost,
2025
2070
  _name=_name,
2026
2071
  **kwargs,