elasticsearch 8.13.2__py3-none-any.whl → 8.14.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 (85) hide show
  1. elasticsearch/_async/client/__init__.py +51 -44
  2. elasticsearch/_async/client/async_search.py +4 -4
  3. elasticsearch/_async/client/autoscaling.py +4 -4
  4. elasticsearch/_async/client/cat.py +26 -26
  5. elasticsearch/_async/client/ccr.py +13 -13
  6. elasticsearch/_async/client/cluster.py +23 -25
  7. elasticsearch/_async/client/dangling_indices.py +3 -3
  8. elasticsearch/_async/client/enrich.py +5 -5
  9. elasticsearch/_async/client/eql.py +4 -4
  10. elasticsearch/_async/client/esql.py +1 -1
  11. elasticsearch/_async/client/features.py +2 -2
  12. elasticsearch/_async/client/fleet.py +1 -1
  13. elasticsearch/_async/client/graph.py +1 -1
  14. elasticsearch/_async/client/ilm.py +11 -11
  15. elasticsearch/_async/client/indices.py +182 -157
  16. elasticsearch/_async/client/inference.py +34 -17
  17. elasticsearch/_async/client/ingest.py +6 -6
  18. elasticsearch/_async/client/license.py +7 -7
  19. elasticsearch/_async/client/logstash.py +3 -3
  20. elasticsearch/_async/client/migration.py +3 -3
  21. elasticsearch/_async/client/ml.py +73 -73
  22. elasticsearch/_async/client/monitoring.py +1 -1
  23. elasticsearch/_async/client/nodes.py +7 -7
  24. elasticsearch/_async/client/query_ruleset.py +4 -4
  25. elasticsearch/_async/client/rollup.py +8 -8
  26. elasticsearch/_async/client/search_application.py +13 -8
  27. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  28. elasticsearch/_async/client/security.py +63 -53
  29. elasticsearch/_async/client/slm.py +9 -9
  30. elasticsearch/_async/client/snapshot.py +11 -11
  31. elasticsearch/_async/client/sql.py +6 -6
  32. elasticsearch/_async/client/ssl.py +1 -1
  33. elasticsearch/_async/client/synonyms.py +7 -7
  34. elasticsearch/_async/client/tasks.py +3 -3
  35. elasticsearch/_async/client/text_structure.py +2 -2
  36. elasticsearch/_async/client/transform.py +11 -11
  37. elasticsearch/_async/client/watcher.py +11 -11
  38. elasticsearch/_async/client/xpack.py +2 -2
  39. elasticsearch/_sync/client/__init__.py +51 -44
  40. elasticsearch/_sync/client/async_search.py +4 -4
  41. elasticsearch/_sync/client/autoscaling.py +4 -4
  42. elasticsearch/_sync/client/cat.py +26 -26
  43. elasticsearch/_sync/client/ccr.py +13 -13
  44. elasticsearch/_sync/client/cluster.py +23 -25
  45. elasticsearch/_sync/client/dangling_indices.py +3 -3
  46. elasticsearch/_sync/client/enrich.py +5 -5
  47. elasticsearch/_sync/client/eql.py +4 -4
  48. elasticsearch/_sync/client/esql.py +1 -1
  49. elasticsearch/_sync/client/features.py +2 -2
  50. elasticsearch/_sync/client/fleet.py +1 -1
  51. elasticsearch/_sync/client/graph.py +1 -1
  52. elasticsearch/_sync/client/ilm.py +11 -11
  53. elasticsearch/_sync/client/indices.py +182 -157
  54. elasticsearch/_sync/client/inference.py +34 -17
  55. elasticsearch/_sync/client/ingest.py +6 -6
  56. elasticsearch/_sync/client/license.py +7 -7
  57. elasticsearch/_sync/client/logstash.py +3 -3
  58. elasticsearch/_sync/client/migration.py +3 -3
  59. elasticsearch/_sync/client/ml.py +73 -73
  60. elasticsearch/_sync/client/monitoring.py +1 -1
  61. elasticsearch/_sync/client/nodes.py +7 -7
  62. elasticsearch/_sync/client/query_ruleset.py +4 -4
  63. elasticsearch/_sync/client/rollup.py +8 -8
  64. elasticsearch/_sync/client/search_application.py +13 -8
  65. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  66. elasticsearch/_sync/client/security.py +63 -53
  67. elasticsearch/_sync/client/slm.py +9 -9
  68. elasticsearch/_sync/client/snapshot.py +11 -11
  69. elasticsearch/_sync/client/sql.py +6 -6
  70. elasticsearch/_sync/client/ssl.py +1 -1
  71. elasticsearch/_sync/client/synonyms.py +7 -7
  72. elasticsearch/_sync/client/tasks.py +3 -3
  73. elasticsearch/_sync/client/text_structure.py +2 -2
  74. elasticsearch/_sync/client/transform.py +11 -11
  75. elasticsearch/_sync/client/watcher.py +11 -11
  76. elasticsearch/_sync/client/xpack.py +2 -2
  77. elasticsearch/_version.py +1 -1
  78. elasticsearch/serializer.py +0 -1
  79. {elasticsearch-8.13.2.dist-info → elasticsearch-8.14.0.dist-info}/METADATA +15 -1
  80. elasticsearch-8.14.0.dist-info/RECORD +116 -0
  81. elasticsearch-8.13.2.dist-info/RECORD +0 -116
  82. {elasticsearch-8.13.2.dist-info → elasticsearch-8.14.0.dist-info}/LICENSE +0 -0
  83. {elasticsearch-8.13.2.dist-info → elasticsearch-8.14.0.dist-info}/NOTICE +0 -0
  84. {elasticsearch-8.13.2.dist-info → elasticsearch-8.14.0.dist-info}/WHEEL +0 -0
  85. {elasticsearch-8.13.2.dist-info → elasticsearch-8.14.0.dist-info}/top_level.txt +0 -0
@@ -31,7 +31,10 @@ class InferenceClient(NamespacedClient):
31
31
  *,
32
32
  inference_id: str,
33
33
  task_type: t.Optional[
34
- t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
34
+ t.Union[
35
+ "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']",
36
+ str,
37
+ ]
35
38
  ] = None,
36
39
  error_trace: t.Optional[bool] = None,
37
40
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -41,7 +44,7 @@ class InferenceClient(NamespacedClient):
41
44
  """
42
45
  Delete model in the Inference API
43
46
 
44
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-inference-api.html>`_
47
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/delete-inference-api.html>`_
45
48
 
46
49
  :param inference_id: The inference Id
47
50
  :param task_type: The task type
@@ -85,7 +88,10 @@ class InferenceClient(NamespacedClient):
85
88
  *,
86
89
  inference_id: str,
87
90
  task_type: t.Optional[
88
- t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
91
+ t.Union[
92
+ "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']",
93
+ str,
94
+ ]
89
95
  ] = None,
90
96
  error_trace: t.Optional[bool] = None,
91
97
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -95,7 +101,7 @@ class InferenceClient(NamespacedClient):
95
101
  """
96
102
  Get a model in the Inference API
97
103
 
98
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-inference-api.html>`_
104
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-inference-api.html>`_
99
105
 
100
106
  :param inference_id: The inference Id
101
107
  :param task_type: The task type
@@ -134,7 +140,7 @@ class InferenceClient(NamespacedClient):
134
140
  )
135
141
 
136
142
  @_rewrite_parameters(
137
- body_fields=("input", "task_settings"),
143
+ body_fields=("input", "query", "task_settings"),
138
144
  )
139
145
  def inference(
140
146
  self,
@@ -142,24 +148,32 @@ class InferenceClient(NamespacedClient):
142
148
  inference_id: str,
143
149
  input: t.Optional[t.Union[str, t.Sequence[str]]] = None,
144
150
  task_type: t.Optional[
145
- t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
151
+ t.Union[
152
+ "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']",
153
+ str,
154
+ ]
146
155
  ] = None,
147
156
  error_trace: t.Optional[bool] = None,
148
157
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
149
158
  human: t.Optional[bool] = None,
150
159
  pretty: t.Optional[bool] = None,
160
+ query: t.Optional[str] = None,
151
161
  task_settings: t.Optional[t.Any] = None,
162
+ timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
152
163
  body: t.Optional[t.Dict[str, t.Any]] = None,
153
164
  ) -> ObjectApiResponse[t.Any]:
154
165
  """
155
166
  Perform inference on a model
156
167
 
157
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/post-inference-api.html>`_
168
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/post-inference-api.html>`_
158
169
 
159
170
  :param inference_id: The inference Id
160
171
  :param input: Text input to the model. Either a string or an array of strings.
161
172
  :param task_type: The task type
173
+ :param query: Query input, required for rerank task. Not required for other tasks.
162
174
  :param task_settings: Optional task settings
175
+ :param timeout: Specifies the amount of time to wait for the inference request
176
+ to complete.
163
177
  """
164
178
  if inference_id in SKIP_IN_PATH:
165
179
  raise ValueError("Empty value passed for parameter 'inference_id'")
@@ -187,9 +201,13 @@ class InferenceClient(NamespacedClient):
187
201
  __query["human"] = human
188
202
  if pretty is not None:
189
203
  __query["pretty"] = pretty
204
+ if timeout is not None:
205
+ __query["timeout"] = timeout
190
206
  if not __body:
191
207
  if input is not None:
192
208
  __body["input"] = input
209
+ if query is not None:
210
+ __body["query"] = query
193
211
  if task_settings is not None:
194
212
  __body["task_settings"] = task_settings
195
213
  if not __body:
@@ -214,24 +232,27 @@ class InferenceClient(NamespacedClient):
214
232
  self,
215
233
  *,
216
234
  inference_id: str,
235
+ model_config: t.Optional[t.Mapping[str, t.Any]] = None,
236
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
217
237
  task_type: t.Optional[
218
- t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
238
+ t.Union[
239
+ "t.Literal['completion', 'rerank', 'sparse_embedding', 'text_embedding']",
240
+ str,
241
+ ]
219
242
  ] = None,
220
243
  error_trace: t.Optional[bool] = None,
221
244
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
222
245
  human: t.Optional[bool] = None,
223
- model_config: t.Optional[t.Mapping[str, t.Any]] = None,
224
- body: t.Optional[t.Mapping[str, t.Any]] = None,
225
246
  pretty: t.Optional[bool] = None,
226
247
  ) -> ObjectApiResponse[t.Any]:
227
248
  """
228
249
  Configure a model for use in the Inference API
229
250
 
230
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-inference-api.html>`_
251
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/put-inference-api.html>`_
231
252
 
232
253
  :param inference_id: The inference Id
233
- :param task_type: The task type
234
254
  :param model_config:
255
+ :param task_type: The task type
235
256
  """
236
257
  if inference_id in SKIP_IN_PATH:
237
258
  raise ValueError("Empty value passed for parameter 'inference_id'")
@@ -263,11 +284,7 @@ class InferenceClient(NamespacedClient):
263
284
  if pretty is not None:
264
285
  __query["pretty"] = pretty
265
286
  __body = model_config if model_config is not None else body
266
- if not __body:
267
- __body = None
268
- __headers = {"accept": "application/json"}
269
- if __body is not None:
270
- __headers["content-type"] = "application/json"
287
+ __headers = {"accept": "application/json", "content-type": "application/json"}
271
288
  return self.perform_request( # type: ignore[return-value]
272
289
  "PUT",
273
290
  __path,
@@ -42,7 +42,7 @@ class IngestClient(NamespacedClient):
42
42
  """
43
43
  Deletes a pipeline.
44
44
 
45
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-pipeline-api.html>`_
45
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/delete-pipeline-api.html>`_
46
46
 
47
47
  :param id: Pipeline ID or wildcard expression of pipeline IDs used to limit the
48
48
  request. To delete all ingest pipelines in a cluster, use a value of `*`.
@@ -91,7 +91,7 @@ class IngestClient(NamespacedClient):
91
91
  """
92
92
  Returns statistical information about geoip databases
93
93
 
94
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/geoip-processor.html>`_
94
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/geoip-processor.html>`_
95
95
  """
96
96
  __path_parts: t.Dict[str, str] = {}
97
97
  __path = "/_ingest/geoip/stats"
@@ -131,7 +131,7 @@ class IngestClient(NamespacedClient):
131
131
  """
132
132
  Returns a pipeline.
133
133
 
134
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-pipeline-api.html>`_
134
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-pipeline-api.html>`_
135
135
 
136
136
  :param id: Comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions
137
137
  are supported. To get all ingest pipelines, omit this parameter or use `*`.
@@ -182,7 +182,7 @@ class IngestClient(NamespacedClient):
182
182
  """
183
183
  Returns a list of the built-in patterns.
184
184
 
185
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/grok-processor.html>`_
185
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/grok-processor.html>`_
186
186
  """
187
187
  __path_parts: t.Dict[str, str] = {}
188
188
  __path = "/_ingest/processor/grok"
@@ -232,7 +232,7 @@ class IngestClient(NamespacedClient):
232
232
  """
233
233
  Creates or updates a pipeline.
234
234
 
235
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/ingest.html>`_
235
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/ingest.html>`_
236
236
 
237
237
  :param id: ID of the ingest pipeline to create or update.
238
238
  :param description: Description of the ingest pipeline.
@@ -318,7 +318,7 @@ class IngestClient(NamespacedClient):
318
318
  """
319
319
  Allows to simulate a pipeline with example documents.
320
320
 
321
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/simulate-pipeline-api.html>`_
321
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/simulate-pipeline-api.html>`_
322
322
 
323
323
  :param id: Pipeline to test. If you don’t specify a `pipeline` in the request
324
324
  body, this parameter is required.
@@ -37,7 +37,7 @@ class LicenseClient(NamespacedClient):
37
37
  """
38
38
  Deletes licensing information for the cluster
39
39
 
40
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-license.html>`_
40
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/delete-license.html>`_
41
41
  """
42
42
  __path_parts: t.Dict[str, str] = {}
43
43
  __path = "/_license"
@@ -74,7 +74,7 @@ class LicenseClient(NamespacedClient):
74
74
  """
75
75
  Retrieves licensing information for the cluster
76
76
 
77
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-license.html>`_
77
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-license.html>`_
78
78
 
79
79
  :param accept_enterprise: If `true`, this parameter returns enterprise for Enterprise
80
80
  license types. If `false`, this parameter returns platinum for both platinum
@@ -120,7 +120,7 @@ class LicenseClient(NamespacedClient):
120
120
  """
121
121
  Retrieves information about the status of the basic license.
122
122
 
123
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-basic-status.html>`_
123
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-basic-status.html>`_
124
124
  """
125
125
  __path_parts: t.Dict[str, str] = {}
126
126
  __path = "/_license/basic_status"
@@ -155,7 +155,7 @@ class LicenseClient(NamespacedClient):
155
155
  """
156
156
  Retrieves information about the status of the trial license.
157
157
 
158
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-trial-status.html>`_
158
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-trial-status.html>`_
159
159
  """
160
160
  __path_parts: t.Dict[str, str] = {}
161
161
  __path = "/_license/trial_status"
@@ -196,7 +196,7 @@ class LicenseClient(NamespacedClient):
196
196
  """
197
197
  Updates the license for the cluster.
198
198
 
199
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/update-license.html>`_
199
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/update-license.html>`_
200
200
 
201
201
  :param acknowledge: Specifies whether you acknowledge the license changes.
202
202
  :param license:
@@ -250,7 +250,7 @@ class LicenseClient(NamespacedClient):
250
250
  """
251
251
  Starts an indefinite basic license.
252
252
 
253
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/start-basic.html>`_
253
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/start-basic.html>`_
254
254
 
255
255
  :param acknowledge: whether the user has acknowledged acknowledge messages (default:
256
256
  false)
@@ -292,7 +292,7 @@ class LicenseClient(NamespacedClient):
292
292
  """
293
293
  starts a limited time trial license.
294
294
 
295
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/start-trial.html>`_
295
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/start-trial.html>`_
296
296
 
297
297
  :param acknowledge: whether the user has acknowledged acknowledge messages (default:
298
298
  false)
@@ -38,7 +38,7 @@ class LogstashClient(NamespacedClient):
38
38
  """
39
39
  Deletes Logstash Pipelines used by Central Management
40
40
 
41
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/logstash-api-delete-pipeline.html>`_
41
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/logstash-api-delete-pipeline.html>`_
42
42
 
43
43
  :param id: Identifier for the pipeline.
44
44
  """
@@ -78,7 +78,7 @@ class LogstashClient(NamespacedClient):
78
78
  """
79
79
  Retrieves Logstash Pipelines used by Central Management
80
80
 
81
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/logstash-api-get-pipeline.html>`_
81
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/logstash-api-get-pipeline.html>`_
82
82
 
83
83
  :param id: Comma-separated list of pipeline identifiers.
84
84
  """
@@ -125,7 +125,7 @@ class LogstashClient(NamespacedClient):
125
125
  """
126
126
  Adds and updates Logstash Pipelines used for Central Management
127
127
 
128
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/logstash-api-put-pipeline.html>`_
128
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/logstash-api-put-pipeline.html>`_
129
129
 
130
130
  :param id: Identifier for the pipeline.
131
131
  :param pipeline:
@@ -40,7 +40,7 @@ class MigrationClient(NamespacedClient):
40
40
  that use deprecated features that will be removed or changed in the next major
41
41
  version.
42
42
 
43
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/migration-api-deprecation.html>`_
43
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/migration-api-deprecation.html>`_
44
44
 
45
45
  :param index: Comma-separate list of data streams or indices to check. Wildcard
46
46
  (*) expressions are supported.
@@ -83,7 +83,7 @@ class MigrationClient(NamespacedClient):
83
83
  """
84
84
  Find out whether system features need to be upgraded or not
85
85
 
86
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/migration-api-feature-upgrade.html>`_
86
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/migration-api-feature-upgrade.html>`_
87
87
  """
88
88
  __path_parts: t.Dict[str, str] = {}
89
89
  __path = "/_migration/system_features"
@@ -118,7 +118,7 @@ class MigrationClient(NamespacedClient):
118
118
  """
119
119
  Begin upgrades for system features
120
120
 
121
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/migration-api-feature-upgrade.html>`_
121
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/migration-api-feature-upgrade.html>`_
122
122
  """
123
123
  __path_parts: t.Dict[str, str] = {}
124
124
  __path = "/_migration/system_features"