elasticsearch 8.17.2__py3-none-any.whl → 9.0.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 (138) hide show
  1. elasticsearch/_async/client/__init__.py +192 -312
  2. elasticsearch/_async/client/_base.py +1 -2
  3. elasticsearch/_async/client/async_search.py +14 -14
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -33
  6. elasticsearch/_async/client/ccr.py +186 -72
  7. elasticsearch/_async/client/cluster.py +42 -23
  8. elasticsearch/_async/client/connector.py +44 -30
  9. elasticsearch/_async/client/dangling_indices.py +3 -3
  10. elasticsearch/_async/client/enrich.py +26 -5
  11. elasticsearch/_async/client/eql.py +32 -4
  12. elasticsearch/_async/client/esql.py +64 -12
  13. elasticsearch/_async/client/features.py +12 -2
  14. elasticsearch/_async/client/fleet.py +23 -19
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +30 -22
  17. elasticsearch/_async/client/indices.py +435 -231
  18. elasticsearch/_async/client/inference.py +1906 -61
  19. elasticsearch/_async/client/ingest.py +32 -38
  20. elasticsearch/_async/client/license.py +51 -16
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +145 -121
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +10 -28
  26. elasticsearch/_async/client/query_rules.py +8 -8
  27. elasticsearch/_async/client/rollup.py +8 -8
  28. elasticsearch/_async/client/search_application.py +13 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  30. elasticsearch/_async/client/security.py +78 -75
  31. elasticsearch/_async/client/shutdown.py +3 -10
  32. elasticsearch/_async/client/simulate.py +6 -6
  33. elasticsearch/_async/client/slm.py +9 -9
  34. elasticsearch/_async/client/snapshot.py +280 -134
  35. elasticsearch/_async/client/sql.py +6 -6
  36. elasticsearch/_async/client/ssl.py +1 -1
  37. elasticsearch/_async/client/synonyms.py +7 -7
  38. elasticsearch/_async/client/tasks.py +3 -9
  39. elasticsearch/_async/client/text_structure.py +4 -4
  40. elasticsearch/_async/client/transform.py +30 -28
  41. elasticsearch/_async/client/watcher.py +23 -15
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_async/helpers.py +0 -1
  44. elasticsearch/_sync/client/__init__.py +192 -312
  45. elasticsearch/_sync/client/_base.py +1 -2
  46. elasticsearch/_sync/client/async_search.py +14 -14
  47. elasticsearch/_sync/client/autoscaling.py +4 -4
  48. elasticsearch/_sync/client/cat.py +26 -33
  49. elasticsearch/_sync/client/ccr.py +186 -72
  50. elasticsearch/_sync/client/cluster.py +42 -23
  51. elasticsearch/_sync/client/connector.py +44 -30
  52. elasticsearch/_sync/client/dangling_indices.py +3 -3
  53. elasticsearch/_sync/client/enrich.py +26 -5
  54. elasticsearch/_sync/client/eql.py +32 -4
  55. elasticsearch/_sync/client/esql.py +64 -12
  56. elasticsearch/_sync/client/features.py +12 -2
  57. elasticsearch/_sync/client/fleet.py +23 -19
  58. elasticsearch/_sync/client/graph.py +1 -1
  59. elasticsearch/_sync/client/ilm.py +30 -22
  60. elasticsearch/_sync/client/indices.py +435 -231
  61. elasticsearch/_sync/client/inference.py +1906 -61
  62. elasticsearch/_sync/client/ingest.py +32 -38
  63. elasticsearch/_sync/client/license.py +51 -16
  64. elasticsearch/_sync/client/logstash.py +3 -3
  65. elasticsearch/_sync/client/migration.py +3 -3
  66. elasticsearch/_sync/client/ml.py +145 -121
  67. elasticsearch/_sync/client/monitoring.py +1 -1
  68. elasticsearch/_sync/client/nodes.py +10 -28
  69. elasticsearch/_sync/client/query_rules.py +8 -8
  70. elasticsearch/_sync/client/rollup.py +8 -8
  71. elasticsearch/_sync/client/search_application.py +13 -13
  72. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  73. elasticsearch/_sync/client/security.py +78 -75
  74. elasticsearch/_sync/client/shutdown.py +3 -10
  75. elasticsearch/_sync/client/simulate.py +6 -6
  76. elasticsearch/_sync/client/slm.py +9 -9
  77. elasticsearch/_sync/client/snapshot.py +280 -134
  78. elasticsearch/_sync/client/sql.py +6 -6
  79. elasticsearch/_sync/client/ssl.py +1 -1
  80. elasticsearch/_sync/client/synonyms.py +7 -7
  81. elasticsearch/_sync/client/tasks.py +3 -9
  82. elasticsearch/_sync/client/text_structure.py +4 -4
  83. elasticsearch/_sync/client/transform.py +30 -28
  84. elasticsearch/_sync/client/utils.py +0 -40
  85. elasticsearch/_sync/client/watcher.py +23 -15
  86. elasticsearch/_sync/client/xpack.py +2 -2
  87. elasticsearch/_version.py +1 -1
  88. elasticsearch/dsl/__init__.py +203 -0
  89. elasticsearch/dsl/_async/__init__.py +16 -0
  90. elasticsearch/dsl/_async/document.py +522 -0
  91. elasticsearch/dsl/_async/faceted_search.py +50 -0
  92. elasticsearch/dsl/_async/index.py +639 -0
  93. elasticsearch/dsl/_async/mapping.py +49 -0
  94. elasticsearch/dsl/_async/search.py +237 -0
  95. elasticsearch/dsl/_async/update_by_query.py +47 -0
  96. elasticsearch/dsl/_sync/__init__.py +16 -0
  97. elasticsearch/dsl/_sync/document.py +514 -0
  98. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  99. elasticsearch/dsl/_sync/index.py +597 -0
  100. elasticsearch/dsl/_sync/mapping.py +49 -0
  101. elasticsearch/dsl/_sync/search.py +230 -0
  102. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  103. elasticsearch/dsl/aggs.py +3734 -0
  104. elasticsearch/dsl/analysis.py +341 -0
  105. elasticsearch/dsl/async_connections.py +37 -0
  106. elasticsearch/dsl/connections.py +142 -0
  107. elasticsearch/dsl/document.py +20 -0
  108. elasticsearch/dsl/document_base.py +444 -0
  109. elasticsearch/dsl/exceptions.py +32 -0
  110. elasticsearch/dsl/faceted_search.py +28 -0
  111. elasticsearch/dsl/faceted_search_base.py +489 -0
  112. elasticsearch/dsl/field.py +4392 -0
  113. elasticsearch/dsl/function.py +180 -0
  114. elasticsearch/dsl/index.py +23 -0
  115. elasticsearch/dsl/index_base.py +178 -0
  116. elasticsearch/dsl/mapping.py +19 -0
  117. elasticsearch/dsl/mapping_base.py +219 -0
  118. elasticsearch/dsl/query.py +2822 -0
  119. elasticsearch/dsl/response/__init__.py +388 -0
  120. elasticsearch/dsl/response/aggs.py +100 -0
  121. elasticsearch/dsl/response/hit.py +53 -0
  122. elasticsearch/dsl/search.py +20 -0
  123. elasticsearch/dsl/search_base.py +1053 -0
  124. elasticsearch/dsl/serializer.py +34 -0
  125. elasticsearch/dsl/types.py +6453 -0
  126. elasticsearch/dsl/update_by_query.py +19 -0
  127. elasticsearch/dsl/update_by_query_base.py +149 -0
  128. elasticsearch/dsl/utils.py +687 -0
  129. elasticsearch/dsl/wrappers.py +144 -0
  130. elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
  131. elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
  132. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/METADATA +12 -15
  133. elasticsearch-9.0.0.dist-info/RECORD +160 -0
  134. elasticsearch/transport.py +0 -57
  135. elasticsearch-8.17.2.dist-info/RECORD +0 -119
  136. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/WHEEL +0 -0
  137. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/LICENSE +0 -0
  138. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/NOTICE +0 -0
@@ -33,6 +33,7 @@ class EnrichClient(NamespacedClient):
33
33
  error_trace: t.Optional[bool] = None,
34
34
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
35
35
  human: t.Optional[bool] = None,
36
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
36
37
  pretty: t.Optional[bool] = None,
37
38
  ) -> ObjectApiResponse[t.Any]:
38
39
  """
@@ -42,9 +43,10 @@ class EnrichClient(NamespacedClient):
42
43
  Deletes an existing enrich policy and its enrich index.</p>
43
44
 
44
45
 
45
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-enrich-policy-api.html>`_
46
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-delete-policy>`_
46
47
 
47
48
  :param name: Enrich policy to delete.
49
+ :param master_timeout: Period to wait for a connection to the master node.
48
50
  """
49
51
  if name in SKIP_IN_PATH:
50
52
  raise ValueError("Empty value passed for parameter 'name'")
@@ -57,6 +59,8 @@ class EnrichClient(NamespacedClient):
57
59
  __query["filter_path"] = filter_path
58
60
  if human is not None:
59
61
  __query["human"] = human
62
+ if master_timeout is not None:
63
+ __query["master_timeout"] = master_timeout
60
64
  if pretty is not None:
61
65
  __query["pretty"] = pretty
62
66
  __headers = {"accept": "application/json"}
@@ -77,6 +81,7 @@ class EnrichClient(NamespacedClient):
77
81
  error_trace: t.Optional[bool] = None,
78
82
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
79
83
  human: t.Optional[bool] = None,
84
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
80
85
  pretty: t.Optional[bool] = None,
81
86
  wait_for_completion: t.Optional[bool] = None,
82
87
  ) -> ObjectApiResponse[t.Any]:
@@ -87,9 +92,10 @@ class EnrichClient(NamespacedClient):
87
92
  Create the enrich index for an existing enrich policy.</p>
88
93
 
89
94
 
90
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/execute-enrich-policy-api.html>`_
95
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-execute-policy>`_
91
96
 
92
97
  :param name: Enrich policy to execute.
98
+ :param master_timeout: Period to wait for a connection to the master node.
93
99
  :param wait_for_completion: If `true`, the request blocks other enrich policy
94
100
  execution requests until complete.
95
101
  """
@@ -104,6 +110,8 @@ class EnrichClient(NamespacedClient):
104
110
  __query["filter_path"] = filter_path
105
111
  if human is not None:
106
112
  __query["human"] = human
113
+ if master_timeout is not None:
114
+ __query["master_timeout"] = master_timeout
107
115
  if pretty is not None:
108
116
  __query["pretty"] = pretty
109
117
  if wait_for_completion is not None:
@@ -126,6 +134,7 @@ class EnrichClient(NamespacedClient):
126
134
  error_trace: t.Optional[bool] = None,
127
135
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
128
136
  human: t.Optional[bool] = None,
137
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
129
138
  pretty: t.Optional[bool] = None,
130
139
  ) -> ObjectApiResponse[t.Any]:
131
140
  """
@@ -135,10 +144,11 @@ class EnrichClient(NamespacedClient):
135
144
  Returns information about an enrich policy.</p>
136
145
 
137
146
 
138
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-enrich-policy-api.html>`_
147
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-get-policy>`_
139
148
 
140
149
  :param name: Comma-separated list of enrich policy names used to limit the request.
141
150
  To return information for all enrich policies, omit this parameter.
151
+ :param master_timeout: Period to wait for a connection to the master node.
142
152
  """
143
153
  __path_parts: t.Dict[str, str]
144
154
  if name not in SKIP_IN_PATH:
@@ -154,6 +164,8 @@ class EnrichClient(NamespacedClient):
154
164
  __query["filter_path"] = filter_path
155
165
  if human is not None:
156
166
  __query["human"] = human
167
+ if master_timeout is not None:
168
+ __query["master_timeout"] = master_timeout
157
169
  if pretty is not None:
158
170
  __query["pretty"] = pretty
159
171
  __headers = {"accept": "application/json"}
@@ -177,6 +189,7 @@ class EnrichClient(NamespacedClient):
177
189
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
178
190
  geo_match: t.Optional[t.Mapping[str, t.Any]] = None,
179
191
  human: t.Optional[bool] = None,
192
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
180
193
  match: t.Optional[t.Mapping[str, t.Any]] = None,
181
194
  pretty: t.Optional[bool] = None,
182
195
  range: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -189,11 +202,12 @@ class EnrichClient(NamespacedClient):
189
202
  Creates an enrich policy.</p>
190
203
 
191
204
 
192
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-enrich-policy-api.html>`_
205
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-put-policy>`_
193
206
 
194
207
  :param name: Name of the enrich policy to create or update.
195
208
  :param geo_match: Matches enrich data to incoming documents based on a `geo_shape`
196
209
  query.
210
+ :param master_timeout: Period to wait for a connection to the master node.
197
211
  :param match: Matches enrich data to incoming documents based on a `term` query.
198
212
  :param range: Matches a number, date, or IP address in incoming documents to
199
213
  a range in the enrich index based on a `term` query.
@@ -210,6 +224,8 @@ class EnrichClient(NamespacedClient):
210
224
  __query["filter_path"] = filter_path
211
225
  if human is not None:
212
226
  __query["human"] = human
227
+ if master_timeout is not None:
228
+ __query["master_timeout"] = master_timeout
213
229
  if pretty is not None:
214
230
  __query["pretty"] = pretty
215
231
  if not __body:
@@ -237,6 +253,7 @@ class EnrichClient(NamespacedClient):
237
253
  error_trace: t.Optional[bool] = None,
238
254
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
239
255
  human: t.Optional[bool] = None,
256
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
240
257
  pretty: t.Optional[bool] = None,
241
258
  ) -> ObjectApiResponse[t.Any]:
242
259
  """
@@ -246,7 +263,9 @@ class EnrichClient(NamespacedClient):
246
263
  Returns enrich coordinator statistics and information about enrich policies that are currently executing.</p>
247
264
 
248
265
 
249
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/enrich-stats-api.html>`_
266
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-enrich-stats>`_
267
+
268
+ :param master_timeout: Period to wait for a connection to the master node.
250
269
  """
251
270
  __path_parts: t.Dict[str, str] = {}
252
271
  __path = "/_enrich/_stats"
@@ -257,6 +276,8 @@ class EnrichClient(NamespacedClient):
257
276
  __query["filter_path"] = filter_path
258
277
  if human is not None:
259
278
  __query["human"] = human
279
+ if master_timeout is not None:
280
+ __query["master_timeout"] = master_timeout
260
281
  if pretty is not None:
261
282
  __query["pretty"] = pretty
262
283
  __headers = {"accept": "application/json"}
@@ -43,7 +43,7 @@ class EqlClient(NamespacedClient):
43
43
  The API also deletes results for the search.</p>
44
44
 
45
45
 
46
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/eql-search-api.html>`_
46
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-eql-delete>`_
47
47
 
48
48
  :param id: Identifier for the search to delete. A search ID is provided in the
49
49
  EQL search API's response for an async search. A search ID is also provided
@@ -93,7 +93,7 @@ class EqlClient(NamespacedClient):
93
93
  Get the current status and available results for an async EQL search or a stored synchronous EQL search.</p>
94
94
 
95
95
 
96
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-eql-search-api.html>`_
96
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-eql-get>`_
97
97
 
98
98
  :param id: Identifier for the search.
99
99
  :param keep_alive: Period for which the search and its results are stored on
@@ -147,7 +147,7 @@ class EqlClient(NamespacedClient):
147
147
  Get the current status for an async EQL search or a stored synchronous EQL search without returning results.</p>
148
148
 
149
149
 
150
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-eql-status-api.html>`_
150
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-eql-get-status>`_
151
151
 
152
152
  :param id: Identifier for the search.
153
153
  """
@@ -177,6 +177,8 @@ class EqlClient(NamespacedClient):
177
177
  @_rewrite_parameters(
178
178
  body_fields=(
179
179
  "query",
180
+ "allow_partial_search_results",
181
+ "allow_partial_sequence_results",
180
182
  "case_sensitive",
181
183
  "event_category_field",
182
184
  "fetch_size",
@@ -184,6 +186,7 @@ class EqlClient(NamespacedClient):
184
186
  "filter",
185
187
  "keep_alive",
186
188
  "keep_on_completion",
189
+ "max_samples_per_key",
187
190
  "result_position",
188
191
  "runtime_mappings",
189
192
  "size",
@@ -198,6 +201,8 @@ class EqlClient(NamespacedClient):
198
201
  index: t.Union[str, t.Sequence[str]],
199
202
  query: t.Optional[str] = None,
200
203
  allow_no_indices: t.Optional[bool] = None,
204
+ allow_partial_search_results: t.Optional[bool] = None,
205
+ allow_partial_sequence_results: t.Optional[bool] = None,
201
206
  case_sensitive: t.Optional[bool] = None,
202
207
  error_trace: t.Optional[bool] = None,
203
208
  event_category_field: t.Optional[str] = None,
@@ -221,6 +226,7 @@ class EqlClient(NamespacedClient):
221
226
  ignore_unavailable: t.Optional[bool] = None,
222
227
  keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
223
228
  keep_on_completion: t.Optional[bool] = None,
229
+ max_samples_per_key: t.Optional[int] = None,
224
230
  pretty: t.Optional[bool] = None,
225
231
  result_position: t.Optional[t.Union[str, t.Literal["head", "tail"]]] = None,
226
232
  runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
@@ -240,11 +246,20 @@ class EqlClient(NamespacedClient):
240
246
  EQL assumes each document in a data stream or index corresponds to an event.</p>
241
247
 
242
248
 
243
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/eql-search-api.html>`_
249
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-eql-search>`_
244
250
 
245
251
  :param index: The name of the index to scope the operation
246
252
  :param query: EQL query you wish to run.
247
253
  :param allow_no_indices:
254
+ :param allow_partial_search_results: Allow query execution also in case of shard
255
+ failures. If true, the query will keep running and will return results based
256
+ on the available shards. For sequences, the behavior can be further refined
257
+ using allow_partial_sequence_results
258
+ :param allow_partial_sequence_results: This flag applies only to sequences and
259
+ has effect only if allow_partial_search_results=true. If true, the sequence
260
+ query will return results based on the available shards, ignoring the others.
261
+ If false, the sequence query will return successfully, but will always have
262
+ empty results.
248
263
  :param case_sensitive:
249
264
  :param event_category_field: Field containing the event classification, such
250
265
  as process, file, or network.
@@ -259,6 +274,11 @@ class EqlClient(NamespacedClient):
259
274
  in the response.
260
275
  :param keep_alive:
261
276
  :param keep_on_completion:
277
+ :param max_samples_per_key: By default, the response of a sample query contains
278
+ up to `10` samples, with one sample per unique set of join keys. Use the
279
+ `size` parameter to get a smaller or larger set of samples. To retrieve more
280
+ than one sample per set of join keys, use the `max_samples_per_key` parameter.
281
+ Pipes are not supported for sample queries.
262
282
  :param result_position:
263
283
  :param runtime_mappings:
264
284
  :param size: For basic queries, the maximum number of matching events to return.
@@ -293,6 +313,12 @@ class EqlClient(NamespacedClient):
293
313
  if not __body:
294
314
  if query is not None:
295
315
  __body["query"] = query
316
+ if allow_partial_search_results is not None:
317
+ __body["allow_partial_search_results"] = allow_partial_search_results
318
+ if allow_partial_sequence_results is not None:
319
+ __body["allow_partial_sequence_results"] = (
320
+ allow_partial_sequence_results
321
+ )
296
322
  if case_sensitive is not None:
297
323
  __body["case_sensitive"] = case_sensitive
298
324
  if event_category_field is not None:
@@ -307,6 +333,8 @@ class EqlClient(NamespacedClient):
307
333
  __body["keep_alive"] = keep_alive
308
334
  if keep_on_completion is not None:
309
335
  __body["keep_on_completion"] = keep_on_completion
336
+ if max_samples_per_key is not None:
337
+ __body["max_samples_per_key"] = max_samples_per_key
310
338
  if result_position is not None:
311
339
  __body["result_position"] = result_position
312
340
  if runtime_mappings is not None:
@@ -35,6 +35,7 @@ class EsqlClient(NamespacedClient):
35
35
  "params",
36
36
  "profile",
37
37
  "tables",
38
+ "wait_for_completion_timeout",
38
39
  ),
39
40
  ignore_deprecated_options={"params"},
40
41
  )
@@ -61,9 +62,7 @@ class EsqlClient(NamespacedClient):
61
62
  keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
62
63
  keep_on_completion: t.Optional[bool] = None,
63
64
  locale: t.Optional[str] = None,
64
- params: t.Optional[
65
- t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
66
- ] = None,
65
+ params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None,
67
66
  pretty: t.Optional[bool] = None,
68
67
  profile: t.Optional[bool] = None,
69
68
  tables: t.Optional[
@@ -82,7 +81,7 @@ class EsqlClient(NamespacedClient):
82
81
  <p>The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.</p>
83
82
 
84
83
 
85
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-api.html>`_
84
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-esql-async-query>`_
86
85
 
87
86
  :param query: The ES|QL query API accepts an ES|QL query string in the query
88
87
  parameter, runs it, and returns the results.
@@ -152,8 +151,6 @@ class EsqlClient(NamespacedClient):
152
151
  __query["keep_on_completion"] = keep_on_completion
153
152
  if pretty is not None:
154
153
  __query["pretty"] = pretty
155
- if wait_for_completion_timeout is not None:
156
- __query["wait_for_completion_timeout"] = wait_for_completion_timeout
157
154
  if not __body:
158
155
  if query is not None:
159
156
  __body["query"] = query
@@ -171,6 +168,8 @@ class EsqlClient(NamespacedClient):
171
168
  __body["profile"] = profile
172
169
  if tables is not None:
173
170
  __body["tables"] = tables
171
+ if wait_for_completion_timeout is not None:
172
+ __body["wait_for_completion_timeout"] = wait_for_completion_timeout
174
173
  __headers = {"accept": "application/json", "content-type": "application/json"}
175
174
  return self.perform_request( # type: ignore[return-value]
176
175
  "POST",
@@ -205,7 +204,7 @@ class EsqlClient(NamespacedClient):
205
204
  </ul>
206
205
 
207
206
 
208
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-delete-api.html>`_
207
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-esql-async-query-delete>`_
209
208
 
210
209
  :param id: The unique identifier of the query. A query ID is provided in the
211
210
  ES|QL async query API response for a query that does not complete in the
@@ -258,7 +257,7 @@ class EsqlClient(NamespacedClient):
258
257
  If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.</p>
259
258
 
260
259
 
261
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-get-api.html>`_
260
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-esql-async-query-get>`_
262
261
 
263
262
  :param id: The unique identifier of the query. A query ID is provided in the
264
263
  ES|QL async query API response for a query that does not complete in the
@@ -306,6 +305,61 @@ class EsqlClient(NamespacedClient):
306
305
  path_parts=__path_parts,
307
306
  )
308
307
 
308
+ @_rewrite_parameters()
309
+ def async_query_stop(
310
+ self,
311
+ *,
312
+ id: str,
313
+ drop_null_columns: t.Optional[bool] = None,
314
+ error_trace: t.Optional[bool] = None,
315
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
316
+ human: t.Optional[bool] = None,
317
+ pretty: t.Optional[bool] = None,
318
+ ) -> ObjectApiResponse[t.Any]:
319
+ """
320
+ .. raw:: html
321
+
322
+ <p>Stop async ES|QL query.</p>
323
+ <p>This API interrupts the query execution and returns the results so far.
324
+ If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.</p>
325
+
326
+
327
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-esql-async-query-stop>`_
328
+
329
+ :param id: The unique identifier of the query. A query ID is provided in the
330
+ ES|QL async query API response for a query that does not complete in the
331
+ designated time. A query ID is also provided when the request was submitted
332
+ with the `keep_on_completion` parameter set to `true`.
333
+ :param drop_null_columns: Indicates whether columns that are entirely `null`
334
+ will be removed from the `columns` and `values` portion of the results. If
335
+ `true`, the response will include an extra section under the name `all_columns`
336
+ which has the name of all the columns.
337
+ """
338
+ if id in SKIP_IN_PATH:
339
+ raise ValueError("Empty value passed for parameter 'id'")
340
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
341
+ __path = f'/_query/async/{__path_parts["id"]}/stop'
342
+ __query: t.Dict[str, t.Any] = {}
343
+ if drop_null_columns is not None:
344
+ __query["drop_null_columns"] = drop_null_columns
345
+ if error_trace is not None:
346
+ __query["error_trace"] = error_trace
347
+ if filter_path is not None:
348
+ __query["filter_path"] = filter_path
349
+ if human is not None:
350
+ __query["human"] = human
351
+ if pretty is not None:
352
+ __query["pretty"] = pretty
353
+ __headers = {"accept": "application/json"}
354
+ return self.perform_request( # type: ignore[return-value]
355
+ "POST",
356
+ __path,
357
+ params=__query,
358
+ headers=__headers,
359
+ endpoint_id="esql.async_query_stop",
360
+ path_parts=__path_parts,
361
+ )
362
+
309
363
  @_rewrite_parameters(
310
364
  body_fields=(
311
365
  "query",
@@ -340,9 +394,7 @@ class EsqlClient(NamespacedClient):
340
394
  human: t.Optional[bool] = None,
341
395
  include_ccs_metadata: t.Optional[bool] = None,
342
396
  locale: t.Optional[str] = None,
343
- params: t.Optional[
344
- t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
345
- ] = None,
397
+ params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None,
346
398
  pretty: t.Optional[bool] = None,
347
399
  profile: t.Optional[bool] = None,
348
400
  tables: t.Optional[
@@ -357,7 +409,7 @@ class EsqlClient(NamespacedClient):
357
409
  Get search results for an ES|QL (Elasticsearch query language) query.</p>
358
410
 
359
411
 
360
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-rest.html>`_
412
+ `<https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest>`_
361
413
 
362
414
  :param query: The ES|QL query API accepts an ES|QL query string in the query
363
415
  parameter, runs it, and returns the results.
@@ -32,6 +32,7 @@ class FeaturesClient(NamespacedClient):
32
32
  error_trace: t.Optional[bool] = None,
33
33
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
34
34
  human: t.Optional[bool] = None,
35
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
35
36
  pretty: t.Optional[bool] = None,
36
37
  ) -> ObjectApiResponse[t.Any]:
37
38
  """
@@ -47,7 +48,9 @@ class FeaturesClient(NamespacedClient):
47
48
  In order for a feature state to be listed in this API and recognized as a valid feature state by the create snapshot API, the plugin that defines that feature must be installed on the master node.</p>
48
49
 
49
50
 
50
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-features-api.html>`_
51
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-features-get-features>`_
52
+
53
+ :param master_timeout: Period to wait for a connection to the master node.
51
54
  """
52
55
  __path_parts: t.Dict[str, str] = {}
53
56
  __path = "/_features"
@@ -58,6 +61,8 @@ class FeaturesClient(NamespacedClient):
58
61
  __query["filter_path"] = filter_path
59
62
  if human is not None:
60
63
  __query["human"] = human
64
+ if master_timeout is not None:
65
+ __query["master_timeout"] = master_timeout
61
66
  if pretty is not None:
62
67
  __query["pretty"] = pretty
63
68
  __headers = {"accept": "application/json"}
@@ -78,6 +83,7 @@ class FeaturesClient(NamespacedClient):
78
83
  error_trace: t.Optional[bool] = None,
79
84
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
80
85
  human: t.Optional[bool] = None,
86
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
81
87
  pretty: t.Optional[bool] = None,
82
88
  ) -> ObjectApiResponse[t.Any]:
83
89
  """
@@ -96,7 +102,9 @@ class FeaturesClient(NamespacedClient):
96
102
  <p>IMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes.</p>
97
103
 
98
104
 
99
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
105
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-features-reset-features>`_
106
+
107
+ :param master_timeout: Period to wait for a connection to the master node.
100
108
  """
101
109
  __path_parts: t.Dict[str, str] = {}
102
110
  __path = "/_features/_reset"
@@ -107,6 +115,8 @@ class FeaturesClient(NamespacedClient):
107
115
  __query["filter_path"] = filter_path
108
116
  if human is not None:
109
117
  __query["human"] = human
118
+ if master_timeout is not None:
119
+ __query["master_timeout"] = master_timeout
110
120
  if pretty is not None:
111
121
  __query["pretty"] = pretty
112
122
  __headers = {"accept": "application/json"}
@@ -48,10 +48,12 @@ class FleetClient(NamespacedClient):
48
48
  """
49
49
  .. raw:: html
50
50
 
51
- <p>Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.</p>
51
+ <p>Get global checkpoints.</p>
52
+ <p>Get the current global checkpoints for an index.
53
+ This API is designed for internal use by the Fleet server project.</p>
52
54
 
53
55
 
54
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-global-checkpoints.html>`_
56
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-fleet>`_
55
57
 
56
58
  :param index: A single index or index alias that resolves to a single index.
57
59
  :param checkpoints: A comma separated list of previous global checkpoints. When
@@ -136,11 +138,14 @@ class FleetClient(NamespacedClient):
136
138
  """
137
139
  .. raw:: html
138
140
 
139
- <p>Executes several <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html">fleet searches</a> with a single API request.
140
- The API follows the same structure as the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html">multi search</a> API. However, similar to the fleet search API, it
141
- supports the wait_for_checkpoints parameter.</p>
141
+ <p>Run multiple Fleet searches.
142
+ Run several Fleet searches with a single API request.
143
+ The API follows the same structure as the multi search API.
144
+ However, similar to the Fleet search API, it supports the <code>wait_for_checkpoints</code> parameter.</p>
142
145
 
143
146
 
147
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-fleet-msearch>`_
148
+
144
149
  :param searches:
145
150
  :param index: A single target to search. If the target is an index alias, it
146
151
  must resolve to a single index.
@@ -150,9 +155,9 @@ class FleetClient(NamespacedClient):
150
155
  example, a request targeting foo*,bar* returns an error if an index starts
151
156
  with foo but no index starts with bar.
152
157
  :param allow_partial_search_results: If true, returns partial results if there
153
- are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures).
154
- If false, returns an error with no partial results. Defaults to the configured
155
- cluster setting `search.default_allow_partial_results` which is true by default.
158
+ are shard request timeouts or shard failures. If false, returns an error
159
+ with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`,
160
+ which is true by default.
156
161
  :param ccs_minimize_roundtrips: If true, network roundtrips between the coordinating
157
162
  node and remote clusters are minimized for cross-cluster search requests.
158
163
  :param expand_wildcards: Type of index that wildcard expressions can match. If
@@ -326,7 +331,6 @@ class FleetClient(NamespacedClient):
326
331
  indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
327
332
  lenient: t.Optional[bool] = None,
328
333
  max_concurrent_shard_requests: t.Optional[int] = None,
329
- min_compatible_shard_node: t.Optional[str] = None,
330
334
  min_score: t.Optional[float] = None,
331
335
  pit: t.Optional[t.Mapping[str, t.Any]] = None,
332
336
  post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -346,7 +350,7 @@ class FleetClient(NamespacedClient):
346
350
  script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
347
351
  scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
348
352
  search_after: t.Optional[
349
- t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
353
+ t.Sequence[t.Union[None, bool, float, int, str]]
350
354
  ] = None,
351
355
  search_type: t.Optional[
352
356
  t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
@@ -384,9 +388,12 @@ class FleetClient(NamespacedClient):
384
388
  """
385
389
  .. raw:: html
386
390
 
387
- <p>The purpose of the fleet search api is to provide a search api where the search will only be executed
388
- after provided checkpoint has been processed and is visible for searches inside of Elasticsearch.</p>
391
+ <p>Run a Fleet search.
392
+ The purpose of the Fleet search API is to provide an API where the search will be run only
393
+ after the provided checkpoint has been processed and is visible for searches inside of Elasticsearch.</p>
394
+
389
395
 
396
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-fleet-search>`_
390
397
 
391
398
  :param index: A single target to search. If the target is an index alias, it
392
399
  must resolve to a single index.
@@ -394,9 +401,9 @@ class FleetClient(NamespacedClient):
394
401
  :param aggs:
395
402
  :param allow_no_indices:
396
403
  :param allow_partial_search_results: If true, returns partial results if there
397
- are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures).
398
- If false, returns an error with no partial results. Defaults to the configured
399
- cluster setting `search.default_allow_partial_results` which is true by default.
404
+ are shard request timeouts or shard failures. If false, returns an error
405
+ with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`,
406
+ which is true by default.
400
407
  :param analyze_wildcard:
401
408
  :param analyzer:
402
409
  :param batched_reduce_size:
@@ -422,9 +429,8 @@ class FleetClient(NamespacedClient):
422
429
  :param indices_boost: Boosts the _score of documents from specified indices.
423
430
  :param lenient:
424
431
  :param max_concurrent_shard_requests:
425
- :param min_compatible_shard_node:
426
432
  :param min_score: Minimum _score for matching documents. Documents with a lower
427
- _score are not included in the search results.
433
+ _score are not included in search results and results collected by aggregations.
428
434
  :param pit: Limits the search to a point in time (PIT). If you provide a PIT,
429
435
  you cannot specify an <index> in the request path.
430
436
  :param post_filter:
@@ -537,8 +543,6 @@ class FleetClient(NamespacedClient):
537
543
  __query["lenient"] = lenient
538
544
  if max_concurrent_shard_requests is not None:
539
545
  __query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
540
- if min_compatible_shard_node is not None:
541
- __query["min_compatible_shard_node"] = min_compatible_shard_node
542
546
  if pre_filter_shard_size is not None:
543
547
  __query["pre_filter_shard_size"] = pre_filter_shard_size
544
548
  if preference is not None:
@@ -55,7 +55,7 @@ class GraphClient(NamespacedClient):
55
55
  You can exclude vertices that have already been returned.</p>
56
56
 
57
57
 
58
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/graph-explore-api.html>`_
58
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-graph>`_
59
59
 
60
60
  :param index: Name of the index.
61
61
  :param connections: Specifies or more fields from which you want to extract terms