elasticsearch 8.18.0__py3-none-any.whl → 8.19.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. elasticsearch/_async/client/__init__.py +56 -76
  2. elasticsearch/_async/client/async_search.py +5 -9
  3. elasticsearch/_async/client/autoscaling.py +4 -4
  4. elasticsearch/_async/client/cat.py +620 -65
  5. elasticsearch/_async/client/ccr.py +13 -13
  6. elasticsearch/_async/client/cluster.py +33 -24
  7. elasticsearch/_async/client/connector.py +30 -30
  8. elasticsearch/_async/client/dangling_indices.py +3 -3
  9. elasticsearch/_async/client/enrich.py +5 -5
  10. elasticsearch/_async/client/eql.py +13 -5
  11. elasticsearch/_async/client/esql.py +38 -9
  12. elasticsearch/_async/client/features.py +2 -2
  13. elasticsearch/_async/client/fleet.py +13 -13
  14. elasticsearch/_async/client/graph.py +1 -1
  15. elasticsearch/_async/client/ilm.py +11 -11
  16. elasticsearch/_async/client/indices.py +131 -82
  17. elasticsearch/_async/client/inference.py +516 -110
  18. elasticsearch/_async/client/ingest.py +9 -16
  19. elasticsearch/_async/client/license.py +11 -11
  20. elasticsearch/_async/client/logstash.py +3 -3
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +81 -93
  23. elasticsearch/_async/client/nodes.py +9 -8
  24. elasticsearch/_async/client/query_rules.py +8 -8
  25. elasticsearch/_async/client/rollup.py +8 -8
  26. elasticsearch/_async/client/search_application.py +10 -10
  27. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  28. elasticsearch/_async/client/security.py +72 -80
  29. elasticsearch/_async/client/shutdown.py +3 -3
  30. elasticsearch/_async/client/simulate.py +1 -1
  31. elasticsearch/_async/client/slm.py +9 -9
  32. elasticsearch/_async/client/snapshot.py +19 -13
  33. elasticsearch/_async/client/sql.py +6 -6
  34. elasticsearch/_async/client/ssl.py +1 -1
  35. elasticsearch/_async/client/synonyms.py +7 -7
  36. elasticsearch/_async/client/tasks.py +3 -3
  37. elasticsearch/_async/client/text_structure.py +4 -4
  38. elasticsearch/_async/client/transform.py +11 -11
  39. elasticsearch/_async/client/watcher.py +13 -13
  40. elasticsearch/_async/client/xpack.py +2 -2
  41. elasticsearch/_sync/client/__init__.py +56 -76
  42. elasticsearch/_sync/client/async_search.py +5 -9
  43. elasticsearch/_sync/client/autoscaling.py +4 -4
  44. elasticsearch/_sync/client/cat.py +620 -65
  45. elasticsearch/_sync/client/ccr.py +13 -13
  46. elasticsearch/_sync/client/cluster.py +33 -24
  47. elasticsearch/_sync/client/connector.py +30 -30
  48. elasticsearch/_sync/client/dangling_indices.py +3 -3
  49. elasticsearch/_sync/client/enrich.py +5 -5
  50. elasticsearch/_sync/client/eql.py +13 -5
  51. elasticsearch/_sync/client/esql.py +38 -9
  52. elasticsearch/_sync/client/features.py +2 -2
  53. elasticsearch/_sync/client/fleet.py +13 -13
  54. elasticsearch/_sync/client/graph.py +1 -1
  55. elasticsearch/_sync/client/ilm.py +11 -11
  56. elasticsearch/_sync/client/indices.py +131 -82
  57. elasticsearch/_sync/client/inference.py +516 -110
  58. elasticsearch/_sync/client/ingest.py +9 -16
  59. elasticsearch/_sync/client/license.py +11 -11
  60. elasticsearch/_sync/client/logstash.py +3 -3
  61. elasticsearch/_sync/client/migration.py +3 -3
  62. elasticsearch/_sync/client/ml.py +81 -93
  63. elasticsearch/_sync/client/nodes.py +9 -8
  64. elasticsearch/_sync/client/query_rules.py +8 -8
  65. elasticsearch/_sync/client/rollup.py +8 -8
  66. elasticsearch/_sync/client/search_application.py +10 -10
  67. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  68. elasticsearch/_sync/client/security.py +72 -80
  69. elasticsearch/_sync/client/shutdown.py +3 -3
  70. elasticsearch/_sync/client/simulate.py +1 -1
  71. elasticsearch/_sync/client/slm.py +9 -9
  72. elasticsearch/_sync/client/snapshot.py +19 -13
  73. elasticsearch/_sync/client/sql.py +6 -6
  74. elasticsearch/_sync/client/ssl.py +1 -1
  75. elasticsearch/_sync/client/synonyms.py +7 -7
  76. elasticsearch/_sync/client/tasks.py +3 -3
  77. elasticsearch/_sync/client/text_structure.py +4 -4
  78. elasticsearch/_sync/client/transform.py +11 -11
  79. elasticsearch/_sync/client/watcher.py +13 -13
  80. elasticsearch/_sync/client/xpack.py +2 -2
  81. elasticsearch/_version.py +1 -1
  82. elasticsearch/compat.py +5 -0
  83. elasticsearch/dsl/__init__.py +2 -1
  84. elasticsearch/dsl/_async/document.py +1 -1
  85. elasticsearch/dsl/_sync/document.py +1 -1
  86. elasticsearch/dsl/aggs.py +2 -3
  87. elasticsearch/dsl/document_base.py +176 -16
  88. elasticsearch/dsl/field.py +361 -38
  89. elasticsearch/dsl/query.py +55 -4
  90. elasticsearch/dsl/types.py +151 -22
  91. elasticsearch/dsl/utils.py +1 -1
  92. elasticsearch/esql/__init__.py +18 -0
  93. elasticsearch/esql/esql.py +1105 -0
  94. elasticsearch/esql/functions.py +1738 -0
  95. elasticsearch/exceptions.py +2 -0
  96. {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/METADATA +1 -1
  97. elasticsearch-8.19.0.dist-info/RECORD +164 -0
  98. elasticsearch-8.18.0.dist-info/RECORD +0 -161
  99. {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/WHEEL +0 -0
  100. {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/licenses/LICENSE +0 -0
  101. {elasticsearch-8.18.0.dist-info → elasticsearch-8.19.0.dist-info}/licenses/NOTICE +0 -0
@@ -1083,6 +1083,8 @@ class Knn(Query):
1083
1083
  :arg filter: Filters for the kNN search query
1084
1084
  :arg similarity: The minimum similarity for a vector to be considered
1085
1085
  a match
1086
+ :arg rescore_vector: Apply oversampling and rescoring to quantized
1087
+ vectors *
1086
1088
  :arg boost: Floating point number used to decrease or increase the
1087
1089
  relevance scores of the query. Boost values are relative to the
1088
1090
  default value of 1.0. A boost value between 0 and 1.0 decreases
@@ -1108,6 +1110,9 @@ class Knn(Query):
1108
1110
  k: Union[int, "DefaultType"] = DEFAULT,
1109
1111
  filter: Union[Query, Sequence[Query], "DefaultType"] = DEFAULT,
1110
1112
  similarity: Union[float, "DefaultType"] = DEFAULT,
1113
+ rescore_vector: Union[
1114
+ "types.RescoreVector", Dict[str, Any], "DefaultType"
1115
+ ] = DEFAULT,
1111
1116
  boost: Union[float, "DefaultType"] = DEFAULT,
1112
1117
  _name: Union[str, "DefaultType"] = DEFAULT,
1113
1118
  **kwargs: Any,
@@ -1120,6 +1125,7 @@ class Knn(Query):
1120
1125
  k=k,
1121
1126
  filter=filter,
1122
1127
  similarity=similarity,
1128
+ rescore_vector=rescore_vector,
1123
1129
  boost=boost,
1124
1130
  _name=_name,
1125
1131
  **kwargs,
@@ -1376,7 +1382,49 @@ class MoreLikeThis(Query):
1376
1382
  min_term_freq: Union[int, "DefaultType"] = DEFAULT,
1377
1383
  min_word_length: Union[int, "DefaultType"] = DEFAULT,
1378
1384
  routing: Union[str, "DefaultType"] = DEFAULT,
1379
- 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,
1380
1428
  unlike: Union[
1381
1429
  Union[str, "types.LikeDocument"],
1382
1430
  Sequence[Union[str, "types.LikeDocument"]],
@@ -1986,8 +2034,9 @@ class Regexp(Query):
1986
2034
  class Rule(Query):
1987
2035
  """
1988
2036
  :arg organic: (required)
1989
- :arg ruleset_ids: (required)
1990
2037
  :arg match_criteria: (required)
2038
+ :arg ruleset_ids:
2039
+ :arg ruleset_id:
1991
2040
  :arg boost: Floating point number used to decrease or increase the
1992
2041
  relevance scores of the query. Boost values are relative to the
1993
2042
  default value of 1.0. A boost value between 0 and 1.0 decreases
@@ -2005,16 +2054,18 @@ class Rule(Query):
2005
2054
  self,
2006
2055
  *,
2007
2056
  organic: Union[Query, "DefaultType"] = DEFAULT,
2008
- ruleset_ids: Union[Sequence[str], "DefaultType"] = DEFAULT,
2009
2057
  match_criteria: Any = DEFAULT,
2058
+ ruleset_ids: Union[str, Sequence[str], "DefaultType"] = DEFAULT,
2059
+ ruleset_id: Union[str, "DefaultType"] = DEFAULT,
2010
2060
  boost: Union[float, "DefaultType"] = DEFAULT,
2011
2061
  _name: Union[str, "DefaultType"] = DEFAULT,
2012
2062
  **kwargs: Any,
2013
2063
  ):
2014
2064
  super().__init__(
2015
2065
  organic=organic,
2016
- ruleset_ids=ruleset_ids,
2017
2066
  match_criteria=match_criteria,
2067
+ ruleset_ids=ruleset_ids,
2068
+ ruleset_id=ruleset_id,
2018
2069
  boost=boost,
2019
2070
  _name=_name,
2020
2071
  **kwargs,
@@ -380,15 +380,24 @@ class DenseVectorIndexOptions(AttrDict[Any]):
380
380
  `int4_flat` index types.
381
381
  :arg ef_construction: The number of candidates to track while
382
382
  assembling the list of nearest neighbors for each new node. Only
383
- applicable to `hnsw`, `int8_hnsw`, and `int4_hnsw` index types.
384
- Defaults to `100` if omitted.
383
+ applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw`
384
+ index types. Defaults to `100` if omitted.
385
385
  :arg m: The number of neighbors each node will be connected to in the
386
- HNSW graph. Only applicable to `hnsw`, `int8_hnsw`, and
387
- `int4_hnsw` index types. Defaults to `16` if omitted.
386
+ HNSW graph. Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`,
387
+ and `int4_hnsw` index types. Defaults to `16` if omitted.
388
388
  """
389
389
 
390
390
  type: Union[
391
- Literal["flat", "hnsw", "int4_flat", "int4_hnsw", "int8_flat", "int8_hnsw"],
391
+ Literal[
392
+ "bbq_flat",
393
+ "bbq_hnsw",
394
+ "flat",
395
+ "hnsw",
396
+ "int4_flat",
397
+ "int4_hnsw",
398
+ "int8_flat",
399
+ "int8_hnsw",
400
+ ],
392
401
  DefaultType,
393
402
  ]
394
403
  confidence_interval: Union[float, DefaultType]
@@ -399,7 +408,16 @@ class DenseVectorIndexOptions(AttrDict[Any]):
399
408
  self,
400
409
  *,
401
410
  type: Union[
402
- Literal["flat", "hnsw", "int4_flat", "int4_hnsw", "int8_flat", "int8_hnsw"],
411
+ Literal[
412
+ "bbq_flat",
413
+ "bbq_hnsw",
414
+ "flat",
415
+ "hnsw",
416
+ "int4_flat",
417
+ "int4_hnsw",
418
+ "int8_flat",
419
+ "int8_hnsw",
420
+ ],
403
421
  DefaultType,
404
422
  ] = DEFAULT,
405
423
  confidence_interval: Union[float, DefaultType] = DEFAULT,
@@ -591,6 +609,7 @@ class FieldSort(AttrDict[Any]):
591
609
  "completion",
592
610
  "nested",
593
611
  "object",
612
+ "passthrough",
594
613
  "version",
595
614
  "murmur3",
596
615
  "token_count",
@@ -617,6 +636,7 @@ class FieldSort(AttrDict[Any]):
617
636
  "shape",
618
637
  "histogram",
619
638
  "constant_keyword",
639
+ "counted_keyword",
620
640
  "aggregate_metric_double",
621
641
  "dense_vector",
622
642
  "semantic_text",
@@ -654,6 +674,7 @@ class FieldSort(AttrDict[Any]):
654
674
  "completion",
655
675
  "nested",
656
676
  "object",
677
+ "passthrough",
657
678
  "version",
658
679
  "murmur3",
659
680
  "token_count",
@@ -680,6 +701,7 @@ class FieldSort(AttrDict[Any]):
680
701
  "shape",
681
702
  "histogram",
682
703
  "constant_keyword",
704
+ "counted_keyword",
683
705
  "aggregate_metric_double",
684
706
  "dense_vector",
685
707
  "semantic_text",
@@ -905,7 +927,7 @@ class GeoDistanceSort(AttrDict[Any]):
905
927
 
906
928
  class GeoGridQuery(AttrDict[Any]):
907
929
  """
908
- :arg geogrid:
930
+ :arg geotile:
909
931
  :arg geohash:
910
932
  :arg geohex:
911
933
  :arg boost: Floating point number used to decrease or increase the
@@ -916,7 +938,7 @@ class GeoGridQuery(AttrDict[Any]):
916
938
  :arg _name:
917
939
  """
918
940
 
919
- geogrid: Union[str, DefaultType]
941
+ geotile: Union[str, DefaultType]
920
942
  geohash: Union[str, DefaultType]
921
943
  geohex: Union[str, DefaultType]
922
944
  boost: Union[float, DefaultType]
@@ -925,15 +947,15 @@ class GeoGridQuery(AttrDict[Any]):
925
947
  def __init__(
926
948
  self,
927
949
  *,
928
- geogrid: Union[str, DefaultType] = DEFAULT,
950
+ geotile: Union[str, DefaultType] = DEFAULT,
929
951
  geohash: Union[str, DefaultType] = DEFAULT,
930
952
  geohex: Union[str, DefaultType] = DEFAULT,
931
953
  boost: Union[float, DefaultType] = DEFAULT,
932
954
  _name: Union[str, DefaultType] = DEFAULT,
933
955
  **kwargs: Any,
934
956
  ):
935
- if geogrid is not DEFAULT:
936
- kwargs["geogrid"] = geogrid
957
+ if geotile is not DEFAULT:
958
+ kwargs["geotile"] = geotile
937
959
  if geohash is not DEFAULT:
938
960
  kwargs["geohash"] = geohash
939
961
  if geohex is not DEFAULT:
@@ -1595,11 +1617,7 @@ class InnerHits(AttrDict[Any]):
1595
1617
  DefaultType,
1596
1618
  ]
1597
1619
  seq_no_primary_term: Union[bool, DefaultType]
1598
- fields: Union[
1599
- Union[str, InstrumentedField],
1600
- Sequence[Union[str, InstrumentedField]],
1601
- DefaultType,
1602
- ]
1620
+ fields: Union[Sequence[Union[str, InstrumentedField]], DefaultType]
1603
1621
  sort: Union[
1604
1622
  Union[Union[str, InstrumentedField], "SortOptions"],
1605
1623
  Sequence[Union[Union[str, InstrumentedField], "SortOptions"]],
@@ -1634,11 +1652,7 @@ class InnerHits(AttrDict[Any]):
1634
1652
  DefaultType,
1635
1653
  ] = DEFAULT,
1636
1654
  seq_no_primary_term: Union[bool, DefaultType] = DEFAULT,
1637
- fields: Union[
1638
- Union[str, InstrumentedField],
1639
- Sequence[Union[str, InstrumentedField]],
1640
- DefaultType,
1641
- ] = DEFAULT,
1655
+ fields: Union[Sequence[Union[str, InstrumentedField]], DefaultType] = DEFAULT,
1642
1656
  sort: Union[
1643
1657
  Union[Union[str, InstrumentedField], "SortOptions"],
1644
1658
  Sequence[Union[Union[str, InstrumentedField], "SortOptions"]],
@@ -1767,6 +1781,8 @@ class IntervalsContainer(AttrDict[Any]):
1767
1781
  :arg match: Matches analyzed text.
1768
1782
  :arg prefix: Matches terms that start with a specified set of
1769
1783
  characters.
1784
+ :arg range:
1785
+ :arg regexp:
1770
1786
  :arg wildcard: Matches terms using a wildcard pattern.
1771
1787
  """
1772
1788
 
@@ -1775,6 +1791,8 @@ class IntervalsContainer(AttrDict[Any]):
1775
1791
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
1776
1792
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
1777
1793
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
1794
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType]
1795
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
1778
1796
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
1779
1797
 
1780
1798
  def __init__(
@@ -1785,6 +1803,8 @@ class IntervalsContainer(AttrDict[Any]):
1785
1803
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
1786
1804
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
1787
1805
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
1806
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
1807
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
1788
1808
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
1789
1809
  **kwargs: Any,
1790
1810
  ):
@@ -1798,6 +1818,10 @@ class IntervalsContainer(AttrDict[Any]):
1798
1818
  kwargs["match"] = match
1799
1819
  if prefix is not DEFAULT:
1800
1820
  kwargs["prefix"] = prefix
1821
+ if range is not DEFAULT:
1822
+ kwargs["range"] = range
1823
+ if regexp is not DEFAULT:
1824
+ kwargs["regexp"] = regexp
1801
1825
  if wildcard is not DEFAULT:
1802
1826
  kwargs["wildcard"] = wildcard
1803
1827
  super().__init__(kwargs)
@@ -2018,6 +2042,8 @@ class IntervalsQuery(AttrDict[Any]):
2018
2042
  :arg match: Matches analyzed text.
2019
2043
  :arg prefix: Matches terms that start with a specified set of
2020
2044
  characters.
2045
+ :arg range:
2046
+ :arg regexp:
2021
2047
  :arg wildcard: Matches terms using a wildcard pattern.
2022
2048
  :arg boost: Floating point number used to decrease or increase the
2023
2049
  relevance scores of the query. Boost values are relative to the
@@ -2032,6 +2058,8 @@ class IntervalsQuery(AttrDict[Any]):
2032
2058
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
2033
2059
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
2034
2060
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
2061
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType]
2062
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
2035
2063
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
2036
2064
  boost: Union[float, DefaultType]
2037
2065
  _name: Union[str, DefaultType]
@@ -2044,6 +2072,8 @@ class IntervalsQuery(AttrDict[Any]):
2044
2072
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
2045
2073
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
2046
2074
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
2075
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
2076
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
2047
2077
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
2048
2078
  boost: Union[float, DefaultType] = DEFAULT,
2049
2079
  _name: Union[str, DefaultType] = DEFAULT,
@@ -2059,6 +2089,10 @@ class IntervalsQuery(AttrDict[Any]):
2059
2089
  kwargs["match"] = match
2060
2090
  if prefix is not DEFAULT:
2061
2091
  kwargs["prefix"] = prefix
2092
+ if range is not DEFAULT:
2093
+ kwargs["range"] = range
2094
+ if regexp is not DEFAULT:
2095
+ kwargs["regexp"] = regexp
2062
2096
  if wildcard is not DEFAULT:
2063
2097
  kwargs["wildcard"] = wildcard
2064
2098
  if boost is not DEFAULT:
@@ -2068,6 +2102,83 @@ class IntervalsQuery(AttrDict[Any]):
2068
2102
  super().__init__(kwargs)
2069
2103
 
2070
2104
 
2105
+ class IntervalsRange(AttrDict[Any]):
2106
+ """
2107
+ :arg analyzer: Analyzer used to analyze the `prefix`.
2108
+ :arg gte: Lower term, either gte or gt must be provided.
2109
+ :arg gt: Lower term, either gte or gt must be provided.
2110
+ :arg lte: Upper term, either lte or lt must be provided.
2111
+ :arg lt: Upper term, either lte or lt must be provided.
2112
+ :arg use_field: If specified, match intervals from this field rather
2113
+ than the top-level field. The `prefix` is normalized using the
2114
+ search analyzer from this field, unless `analyzer` is specified
2115
+ separately.
2116
+ """
2117
+
2118
+ analyzer: Union[str, DefaultType]
2119
+ gte: Union[str, DefaultType]
2120
+ gt: Union[str, DefaultType]
2121
+ lte: Union[str, DefaultType]
2122
+ lt: Union[str, DefaultType]
2123
+ use_field: Union[str, InstrumentedField, DefaultType]
2124
+
2125
+ def __init__(
2126
+ self,
2127
+ *,
2128
+ analyzer: Union[str, DefaultType] = DEFAULT,
2129
+ gte: Union[str, DefaultType] = DEFAULT,
2130
+ gt: Union[str, DefaultType] = DEFAULT,
2131
+ lte: Union[str, DefaultType] = DEFAULT,
2132
+ lt: Union[str, DefaultType] = DEFAULT,
2133
+ use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
2134
+ **kwargs: Any,
2135
+ ):
2136
+ if analyzer is not DEFAULT:
2137
+ kwargs["analyzer"] = analyzer
2138
+ if gte is not DEFAULT:
2139
+ kwargs["gte"] = gte
2140
+ if gt is not DEFAULT:
2141
+ kwargs["gt"] = gt
2142
+ if lte is not DEFAULT:
2143
+ kwargs["lte"] = lte
2144
+ if lt is not DEFAULT:
2145
+ kwargs["lt"] = lt
2146
+ if use_field is not DEFAULT:
2147
+ kwargs["use_field"] = str(use_field)
2148
+ super().__init__(kwargs)
2149
+
2150
+
2151
+ class IntervalsRegexp(AttrDict[Any]):
2152
+ """
2153
+ :arg pattern: (required) Regex pattern.
2154
+ :arg analyzer: Analyzer used to analyze the `prefix`.
2155
+ :arg use_field: If specified, match intervals from this field rather
2156
+ than the top-level field. The `prefix` is normalized using the
2157
+ search analyzer from this field, unless `analyzer` is specified
2158
+ separately.
2159
+ """
2160
+
2161
+ pattern: Union[str, DefaultType]
2162
+ analyzer: Union[str, DefaultType]
2163
+ use_field: Union[str, InstrumentedField, DefaultType]
2164
+
2165
+ def __init__(
2166
+ self,
2167
+ *,
2168
+ pattern: Union[str, DefaultType] = DEFAULT,
2169
+ analyzer: Union[str, DefaultType] = DEFAULT,
2170
+ use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
2171
+ **kwargs: Any,
2172
+ ):
2173
+ if pattern is not DEFAULT:
2174
+ kwargs["pattern"] = pattern
2175
+ if analyzer is not DEFAULT:
2176
+ kwargs["analyzer"] = analyzer
2177
+ if use_field is not DEFAULT:
2178
+ kwargs["use_field"] = str(use_field)
2179
+ super().__init__(kwargs)
2180
+
2181
+
2071
2182
  class IntervalsWildcard(AttrDict[Any]):
2072
2183
  """
2073
2184
  :arg pattern: (required) Wildcard pattern used to find matching terms.
@@ -2850,6 +2961,22 @@ class RegressionInferenceOptions(AttrDict[Any]):
2850
2961
  super().__init__(kwargs)
2851
2962
 
2852
2963
 
2964
+ class RescoreVector(AttrDict[Any]):
2965
+ """
2966
+ :arg oversample: (required) Applies the specified oversample factor to
2967
+ k on the approximate kNN search
2968
+ """
2969
+
2970
+ oversample: Union[float, DefaultType]
2971
+
2972
+ def __init__(
2973
+ self, *, oversample: Union[float, DefaultType] = DEFAULT, **kwargs: Any
2974
+ ):
2975
+ if oversample is not DEFAULT:
2976
+ kwargs["oversample"] = oversample
2977
+ super().__init__(kwargs)
2978
+
2979
+
2853
2980
  class ScoreSort(AttrDict[Any]):
2854
2981
  """
2855
2982
  :arg order:
@@ -4756,7 +4883,7 @@ class ErrorCause(AttrDict[Any]):
4756
4883
  """
4757
4884
 
4758
4885
  type: str
4759
- reason: str
4886
+ reason: Union[str, None]
4760
4887
  stack_trace: str
4761
4888
  caused_by: "ErrorCause"
4762
4889
  root_cause: Sequence["ErrorCause"]
@@ -4972,9 +5099,11 @@ class FiltersAggregate(AttrDict[Any]):
4972
5099
  class FiltersBucket(AttrDict[Any]):
4973
5100
  """
4974
5101
  :arg doc_count: (required)
5102
+ :arg key:
4975
5103
  """
4976
5104
 
4977
5105
  doc_count: int
5106
+ key: str
4978
5107
 
4979
5108
 
4980
5109
  class FrequentItemSetsAggregate(AttrDict[Any]):
@@ -333,7 +333,7 @@ class DslBase(metaclass=DslMeta):
333
333
  _expand__to_dot = EXPAND__TO_DOT
334
334
  self._params: Dict[str, Any] = {}
335
335
  for pname, pvalue in params.items():
336
- if pvalue == DEFAULT:
336
+ if pvalue is DEFAULT:
337
337
  continue
338
338
  # expand "__" to dots
339
339
  if "__" in pname and _expand__to_dot:
@@ -0,0 +1,18 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ from .esql import ESQL, and_, not_, or_ # noqa: F401