elasticsearch 8.17.1__py3-none-any.whl → 8.17.2__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 (95) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +1971 -779
  3. elasticsearch/_async/client/async_search.py +33 -22
  4. elasticsearch/_async/client/autoscaling.py +27 -21
  5. elasticsearch/_async/client/cat.py +216 -141
  6. elasticsearch/_async/client/ccr.py +96 -70
  7. elasticsearch/_async/client/cluster.py +150 -142
  8. elasticsearch/_async/client/connector.py +182 -86
  9. elasticsearch/_async/client/dangling_indices.py +19 -13
  10. elasticsearch/_async/client/enrich.py +25 -6
  11. elasticsearch/_async/client/eql.py +22 -9
  12. elasticsearch/_async/client/esql.py +295 -3
  13. elasticsearch/_async/client/features.py +25 -25
  14. elasticsearch/_async/client/fleet.py +15 -9
  15. elasticsearch/_async/client/graph.py +9 -8
  16. elasticsearch/_async/client/ilm.py +85 -55
  17. elasticsearch/_async/client/indices.py +692 -549
  18. elasticsearch/_async/client/inference.py +32 -28
  19. elasticsearch/_async/client/ingest.py +61 -22
  20. elasticsearch/_async/client/license.py +48 -31
  21. elasticsearch/_async/client/logstash.py +17 -6
  22. elasticsearch/_async/client/migration.py +23 -14
  23. elasticsearch/_async/client/ml.py +532 -284
  24. elasticsearch/_async/client/monitoring.py +5 -2
  25. elasticsearch/_async/client/nodes.py +43 -27
  26. elasticsearch/_async/client/query_rules.py +51 -25
  27. elasticsearch/_async/client/rollup.py +111 -73
  28. elasticsearch/_async/client/search_application.py +49 -21
  29. elasticsearch/_async/client/searchable_snapshots.py +21 -8
  30. elasticsearch/_async/client/security.py +810 -472
  31. elasticsearch/_async/client/shutdown.py +31 -26
  32. elasticsearch/_async/client/simulate.py +16 -22
  33. elasticsearch/_async/client/slm.py +55 -30
  34. elasticsearch/_async/client/snapshot.py +173 -192
  35. elasticsearch/_async/client/sql.py +37 -16
  36. elasticsearch/_async/client/ssl.py +16 -17
  37. elasticsearch/_async/client/synonyms.py +50 -29
  38. elasticsearch/_async/client/tasks.py +74 -39
  39. elasticsearch/_async/client/text_structure.py +61 -52
  40. elasticsearch/_async/client/transform.py +108 -79
  41. elasticsearch/_async/client/watcher.py +93 -57
  42. elasticsearch/_async/client/xpack.py +16 -7
  43. elasticsearch/_async/helpers.py +1 -1
  44. elasticsearch/_sync/client/__init__.py +1971 -779
  45. elasticsearch/_sync/client/async_search.py +33 -22
  46. elasticsearch/_sync/client/autoscaling.py +27 -21
  47. elasticsearch/_sync/client/cat.py +216 -141
  48. elasticsearch/_sync/client/ccr.py +96 -70
  49. elasticsearch/_sync/client/cluster.py +150 -142
  50. elasticsearch/_sync/client/connector.py +182 -86
  51. elasticsearch/_sync/client/dangling_indices.py +19 -13
  52. elasticsearch/_sync/client/enrich.py +25 -6
  53. elasticsearch/_sync/client/eql.py +22 -9
  54. elasticsearch/_sync/client/esql.py +295 -3
  55. elasticsearch/_sync/client/features.py +25 -25
  56. elasticsearch/_sync/client/fleet.py +15 -9
  57. elasticsearch/_sync/client/graph.py +9 -8
  58. elasticsearch/_sync/client/ilm.py +85 -55
  59. elasticsearch/_sync/client/indices.py +692 -549
  60. elasticsearch/_sync/client/inference.py +32 -28
  61. elasticsearch/_sync/client/ingest.py +61 -22
  62. elasticsearch/_sync/client/license.py +48 -31
  63. elasticsearch/_sync/client/logstash.py +17 -6
  64. elasticsearch/_sync/client/migration.py +23 -14
  65. elasticsearch/_sync/client/ml.py +532 -284
  66. elasticsearch/_sync/client/monitoring.py +5 -2
  67. elasticsearch/_sync/client/nodes.py +43 -27
  68. elasticsearch/_sync/client/query_rules.py +51 -25
  69. elasticsearch/_sync/client/rollup.py +111 -73
  70. elasticsearch/_sync/client/search_application.py +49 -21
  71. elasticsearch/_sync/client/searchable_snapshots.py +21 -8
  72. elasticsearch/_sync/client/security.py +810 -472
  73. elasticsearch/_sync/client/shutdown.py +31 -26
  74. elasticsearch/_sync/client/simulate.py +16 -22
  75. elasticsearch/_sync/client/slm.py +55 -30
  76. elasticsearch/_sync/client/snapshot.py +173 -192
  77. elasticsearch/_sync/client/sql.py +37 -16
  78. elasticsearch/_sync/client/ssl.py +16 -17
  79. elasticsearch/_sync/client/synonyms.py +50 -29
  80. elasticsearch/_sync/client/tasks.py +74 -39
  81. elasticsearch/_sync/client/text_structure.py +61 -52
  82. elasticsearch/_sync/client/transform.py +108 -79
  83. elasticsearch/_sync/client/utils.py +1 -1
  84. elasticsearch/_sync/client/watcher.py +93 -57
  85. elasticsearch/_sync/client/xpack.py +16 -7
  86. elasticsearch/_version.py +1 -1
  87. elasticsearch/client.py +2 -0
  88. elasticsearch/helpers/actions.py +1 -1
  89. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  90. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
  91. elasticsearch-8.17.2.dist-info/RECORD +119 -0
  92. elasticsearch-8.17.1.dist-info/RECORD +0 -119
  93. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
  94. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
@@ -39,7 +39,11 @@ class TransformClient(NamespacedClient):
39
39
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
40
40
  ) -> ObjectApiResponse[t.Any]:
41
41
  """
42
- Delete a transform. Deletes a transform.
42
+ .. raw:: html
43
+
44
+ <p>Delete a transform.
45
+ Deletes a transform.</p>
46
+
43
47
 
44
48
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-transform.html>`_
45
49
 
@@ -99,7 +103,11 @@ class TransformClient(NamespacedClient):
99
103
  size: t.Optional[int] = None,
100
104
  ) -> ObjectApiResponse[t.Any]:
101
105
  """
102
- Get transforms. Retrieves configuration information for transforms.
106
+ .. raw:: html
107
+
108
+ <p>Get transforms.
109
+ Retrieves configuration information for transforms.</p>
110
+
103
111
 
104
112
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-transform.html>`_
105
113
 
@@ -168,7 +176,11 @@ class TransformClient(NamespacedClient):
168
176
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
169
177
  ) -> ObjectApiResponse[t.Any]:
170
178
  """
171
- Get transform stats. Retrieves usage information for transforms.
179
+ .. raw:: html
180
+
181
+ <p>Get transform stats.
182
+ Retrieves usage information for transforms.</p>
183
+
172
184
 
173
185
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-transform-stats.html>`_
174
186
 
@@ -249,12 +261,14 @@ class TransformClient(NamespacedClient):
249
261
  body: t.Optional[t.Dict[str, t.Any]] = None,
250
262
  ) -> ObjectApiResponse[t.Any]:
251
263
  """
252
- Preview a transform. Generates a preview of the results that you will get when
253
- you create a transform with the same configuration. It returns a maximum of 100
254
- results. The calculations are based on all the current data in the source index.
255
- It also generates a list of mappings and settings for the destination index.
256
- These values are determined based on the field types of the source index and
257
- the transform aggregations.
264
+ .. raw:: html
265
+
266
+ <p>Preview a transform.
267
+ Generates a preview of the results that you will get when you create a transform with the same configuration.</p>
268
+ <p>It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also
269
+ generates a list of mappings and settings for the destination index. These values are determined based on the field
270
+ types of the source index and the transform aggregations.</p>
271
+
258
272
 
259
273
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/preview-transform.html>`_
260
274
 
@@ -371,27 +385,27 @@ class TransformClient(NamespacedClient):
371
385
  body: t.Optional[t.Dict[str, t.Any]] = None,
372
386
  ) -> ObjectApiResponse[t.Any]:
373
387
  """
374
- Create a transform. Creates a transform. A transform copies data from source
375
- indices, transforms it, and persists it into an entity-centric destination index.
376
- You can also think of the destination index as a two-dimensional tabular data
377
- structure (known as a data frame). The ID for each document in the data frame
378
- is generated from a hash of the entity, so there is a unique row per entity.
379
- You must choose either the latest or pivot method for your transform; you cannot
380
- use both in a single transform. If you choose to use the pivot method for your
381
- transform, the entities are defined by the set of `group_by` fields in the pivot
382
- object. If you choose to use the latest method, the entities are defined by the
383
- `unique_key` field values in the latest object. You must have `create_index`,
384
- `index`, and `read` privileges on the destination index and `read` and `view_index_metadata`
385
- privileges on the source indices. When Elasticsearch security features are enabled,
386
- the transform remembers which roles the user that created it had at the time
387
- of creation and uses those same roles. If those roles do not have the required
388
- privileges on the source and destination indices, the transform fails when it
389
- attempts unauthorized operations. NOTE: You must use Kibana or this API to create
390
- a transform. Do not add a transform directly into any `.transform-internal*`
391
- indices using the Elasticsearch index API. If Elasticsearch security features
392
- are enabled, do not give users any privileges on `.transform-internal*` indices.
393
- If you used transforms prior to 7.5, also do not give users any privileges on
394
- `.data-frame-internal*` indices.
388
+ .. raw:: html
389
+
390
+ <p>Create a transform.
391
+ Creates a transform.</p>
392
+ <p>A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as
393
+ a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a
394
+ unique row per entity.</p>
395
+ <p>You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If
396
+ you choose to use the pivot method for your transform, the entities are defined by the set of <code>group_by</code> fields in
397
+ the pivot object. If you choose to use the latest method, the entities are defined by the <code>unique_key</code> field values
398
+ in the latest object.</p>
399
+ <p>You must have <code>create_index</code>, <code>index</code>, and <code>read</code> privileges on the destination index and <code>read</code> and
400
+ <code>view_index_metadata</code> privileges on the source indices. When Elasticsearch security features are enabled, the
401
+ transform remembers which roles the user that created it had at the time of creation and uses those same roles. If
402
+ those roles do not have the required privileges on the source and destination indices, the transform fails when it
403
+ attempts unauthorized operations.</p>
404
+ <p>NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any
405
+ <code>.transform-internal*</code> indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do
406
+ not give users any privileges on <code>.transform-internal*</code> indices. If you used transforms prior to 7.5, also do not
407
+ give users any privileges on <code>.data-frame-internal*</code> indices.</p>
408
+
395
409
 
396
410
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-transform.html>`_
397
411
 
@@ -491,9 +505,13 @@ class TransformClient(NamespacedClient):
491
505
  pretty: t.Optional[bool] = None,
492
506
  ) -> ObjectApiResponse[t.Any]:
493
507
  """
494
- Reset a transform. Resets a transform. Before you can reset it, you must stop
495
- it; alternatively, use the `force` query parameter. If the destination index
496
- was created by the transform, it is deleted.
508
+ .. raw:: html
509
+
510
+ <p>Reset a transform.
511
+ Resets a transform.
512
+ Before you can reset it, you must stop it; alternatively, use the <code>force</code> query parameter.
513
+ If the destination index was created by the transform, it is deleted.</p>
514
+
497
515
 
498
516
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/reset-transform.html>`_
499
517
 
@@ -541,11 +559,15 @@ class TransformClient(NamespacedClient):
541
559
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
542
560
  ) -> ObjectApiResponse[t.Any]:
543
561
  """
544
- Schedule a transform to start now. Instantly runs a transform to process data.
545
- If you _schedule_now a transform, it will process the new data instantly, without
546
- waiting for the configured frequency interval. After _schedule_now API is called,
547
- the transform will be processed again at now + frequency unless _schedule_now
548
- API is called again in the meantime.
562
+ .. raw:: html
563
+
564
+ <p>Schedule a transform to start now.
565
+ Instantly runs a transform to process data.</p>
566
+ <p>If you _schedule_now a transform, it will process the new data instantly,
567
+ without waiting for the configured frequency interval. After _schedule_now API is called,
568
+ the transform will be processed again at now + frequency unless _schedule_now API
569
+ is called again in the meantime.</p>
570
+
549
571
 
550
572
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/schedule-now-transform.html>`_
551
573
 
@@ -592,24 +614,24 @@ class TransformClient(NamespacedClient):
592
614
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
593
615
  ) -> ObjectApiResponse[t.Any]:
594
616
  """
595
- Start a transform. Starts a transform. When you start a transform, it creates
596
- the destination index if it does not already exist. The `number_of_shards` is
597
- set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform,
598
- it deduces the mapping definitions for the destination index from the source
599
- indices and the transform aggregations. If fields in the destination index are
600
- derived from scripts (as in the case of `scripted_metric` or `bucket_script`
601
- aggregations), the transform uses dynamic mappings unless an index template exists.
602
- If it is a latest transform, it does not deduce mapping definitions; it uses
603
- dynamic mappings. To use explicit mappings, create the destination index before
604
- you start the transform. Alternatively, you can create an index template, though
605
- it does not affect the deduced mappings in a pivot transform. When the transform
606
- starts, a series of validations occur to ensure its success. If you deferred
607
- validation when you created the transform, they occur when you start the transform—​with
608
- the exception of privilege checks. When Elasticsearch security features are enabled,
609
- the transform remembers which roles the user that created it had at the time
610
- of creation and uses those same roles. If those roles do not have the required
611
- privileges on the source and destination indices, the transform fails when it
612
- attempts unauthorized operations.
617
+ .. raw:: html
618
+
619
+ <p>Start a transform.
620
+ Starts a transform.</p>
621
+ <p>When you start a transform, it creates the destination index if it does not already exist. The <code>number_of_shards</code> is
622
+ set to <code>1</code> and the <code>auto_expand_replicas</code> is set to <code>0-1</code>. If it is a pivot transform, it deduces the mapping
623
+ definitions for the destination index from the source indices and the transform aggregations. If fields in the
624
+ destination index are derived from scripts (as in the case of <code>scripted_metric</code> or <code>bucket_script</code> aggregations),
625
+ the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce
626
+ mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you
627
+ start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings
628
+ in a pivot transform.</p>
629
+ <p>When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you
630
+ created the transform, they occur when you start the transform—​with the exception of privilege checks. When
631
+ Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the
632
+ time of creation and uses those same roles. If those roles do not have the required privileges on the source and
633
+ destination indices, the transform fails when it attempts unauthorized operations.</p>
634
+
613
635
 
614
636
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-transform.html>`_
615
637
 
@@ -663,7 +685,11 @@ class TransformClient(NamespacedClient):
663
685
  wait_for_completion: t.Optional[bool] = None,
664
686
  ) -> ObjectApiResponse[t.Any]:
665
687
  """
666
- Stop transforms. Stops one or more transforms.
688
+ .. raw:: html
689
+
690
+ <p>Stop transforms.
691
+ Stops one or more transforms.</p>
692
+
667
693
 
668
694
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/stop-transform.html>`_
669
695
 
@@ -756,14 +782,16 @@ class TransformClient(NamespacedClient):
756
782
  body: t.Optional[t.Dict[str, t.Any]] = None,
757
783
  ) -> ObjectApiResponse[t.Any]:
758
784
  """
759
- Update a transform. Updates certain properties of a transform. All updated properties
760
- except `description` do not take effect until after the transform starts the
761
- next checkpoint, thus there is data consistency in each checkpoint. To use this
762
- API, you must have `read` and `view_index_metadata` privileges for the source
763
- indices. You must also have `index` and `read` privileges for the destination
764
- index. When Elasticsearch security features are enabled, the transform remembers
765
- which roles the user who updated it had at the time of update and runs with those
766
- privileges.
785
+ .. raw:: html
786
+
787
+ <p>Update a transform.
788
+ Updates certain properties of a transform.</p>
789
+ <p>All updated properties except <code>description</code> do not take effect until after the transform starts the next checkpoint,
790
+ thus there is data consistency in each checkpoint. To use this API, you must have <code>read</code> and <code>view_index_metadata</code>
791
+ privileges for the source indices. You must also have <code>index</code> and <code>read</code> privileges for the destination index. When
792
+ Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the
793
+ time of update and runs with those privileges.</p>
794
+
767
795
 
768
796
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-transform.html>`_
769
797
 
@@ -844,20 +872,21 @@ class TransformClient(NamespacedClient):
844
872
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
845
873
  ) -> ObjectApiResponse[t.Any]:
846
874
  """
847
- Upgrade all transforms. Transforms are compatible across minor versions and between
848
- supported major versions. However, over time, the format of transform configuration
849
- information may change. This API identifies transforms that have a legacy configuration
850
- format and upgrades them to the latest version. It also cleans up the internal
851
- data structures that store the transform state and checkpoints. The upgrade does
852
- not affect the source and destination indices. The upgrade also does not affect
853
- the roles that transforms use when Elasticsearch security features are enabled;
854
- the role used to read source data and write to the destination index remains
855
- unchanged. If a transform upgrade step fails, the upgrade stops and an error
856
- is returned about the underlying issue. Resolve the issue then re-run the process
857
- again. A summary is returned when the upgrade is finished. To ensure continuous
858
- transforms remain running during a major version upgrade of the cluster – for
859
- example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading
860
- the cluster. You may want to perform a recent cluster backup prior to the upgrade.
875
+ .. raw:: html
876
+
877
+ <p>Upgrade all transforms.
878
+ Transforms are compatible across minor versions and between supported major versions.
879
+ However, over time, the format of transform configuration information may change.
880
+ This API identifies transforms that have a legacy configuration format and upgrades them to the latest version.
881
+ It also cleans up the internal data structures that store the transform state and checkpoints.
882
+ The upgrade does not affect the source and destination indices.
883
+ The upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged.</p>
884
+ <p>If a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue.
885
+ Resolve the issue then re-run the process again.
886
+ A summary is returned when the upgrade is finished.</p>
887
+ <p>To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster.
888
+ You may want to perform a recent cluster backup prior to the upgrade.</p>
889
+
861
890
 
862
891
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/upgrade-transforms.html>`_
863
892
 
@@ -232,7 +232,7 @@ def host_mapping_to_node_config(host: Mapping[str, Union[str, int]]) -> NodeConf
232
232
  )
233
233
  options["path_prefix"] = options.pop("url_prefix")
234
234
 
235
- return NodeConfig(**options) # type: ignore
235
+ return NodeConfig(**options) # type: ignore[arg-type]
236
236
 
237
237
 
238
238
  def cloud_id_to_node_configs(cloud_id: str) -> List[NodeConfig]:
@@ -37,14 +37,16 @@ class WatcherClient(NamespacedClient):
37
37
  pretty: t.Optional[bool] = None,
38
38
  ) -> ObjectApiResponse[t.Any]:
39
39
  """
40
- Acknowledge a watch. Acknowledging a watch enables you to manually throttle the
41
- execution of the watch's actions. The acknowledgement state of an action is stored
42
- in the `status.actions.<id>.ack.state` structure. IMPORTANT: If the specified
43
- watch is currently being executed, this API will return an error The reason for
44
- this behavior is to prevent overwriting the watch status from a watch execution.
45
- Acknowledging an action throttles further executions of that action until its
46
- `ack.state` is reset to `awaits_successful_execution`. This happens when the
47
- condition of the watch is not met (the condition evaluates to false).
40
+ .. raw:: html
41
+
42
+ <p>Acknowledge a watch.
43
+ Acknowledging a watch enables you to manually throttle the execution of the watch's actions.</p>
44
+ <p>The acknowledgement state of an action is stored in the <code>status.actions.&lt;id&gt;.ack.state</code> structure.</p>
45
+ <p>IMPORTANT: If the specified watch is currently being executed, this API will return an error
46
+ The reason for this behavior is to prevent overwriting the watch status from a watch execution.</p>
47
+ <p>Acknowledging an action throttles further executions of that action until its <code>ack.state</code> is reset to <code>awaits_successful_execution</code>.
48
+ This happens when the condition of the watch is not met (the condition evaluates to false).</p>
49
+
48
50
 
49
51
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-ack-watch.html>`_
50
52
 
@@ -96,7 +98,11 @@ class WatcherClient(NamespacedClient):
96
98
  pretty: t.Optional[bool] = None,
97
99
  ) -> ObjectApiResponse[t.Any]:
98
100
  """
99
- Activate a watch. A watch can be either active or inactive.
101
+ .. raw:: html
102
+
103
+ <p>Activate a watch.
104
+ A watch can be either active or inactive.</p>
105
+
100
106
 
101
107
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-activate-watch.html>`_
102
108
 
@@ -136,7 +142,11 @@ class WatcherClient(NamespacedClient):
136
142
  pretty: t.Optional[bool] = None,
137
143
  ) -> ObjectApiResponse[t.Any]:
138
144
  """
139
- Deactivate a watch. A watch can be either active or inactive.
145
+ .. raw:: html
146
+
147
+ <p>Deactivate a watch.
148
+ A watch can be either active or inactive.</p>
149
+
140
150
 
141
151
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-deactivate-watch.html>`_
142
152
 
@@ -176,13 +186,15 @@ class WatcherClient(NamespacedClient):
176
186
  pretty: t.Optional[bool] = None,
177
187
  ) -> ObjectApiResponse[t.Any]:
178
188
  """
179
- Delete a watch. When the watch is removed, the document representing the watch
180
- in the `.watches` index is gone and it will never be run again. Deleting a watch
181
- does not delete any watch execution records related to this watch from the watch
182
- history. IMPORTANT: Deleting a watch must be done by using only this API. Do
183
- not delete the watch directly from the `.watches` index using the Elasticsearch
184
- delete document API When Elasticsearch security features are enabled, make sure
185
- no write privileges are granted to anyone for the `.watches` index.
189
+ .. raw:: html
190
+
191
+ <p>Delete a watch.
192
+ When the watch is removed, the document representing the watch in the <code>.watches</code> index is gone and it will never be run again.</p>
193
+ <p>Deleting a watch does not delete any watch execution records related to this watch from the watch history.</p>
194
+ <p>IMPORTANT: Deleting a watch must be done by using only this API.
195
+ Do not delete the watch directly from the <code>.watches</code> index using the Elasticsearch delete document API
196
+ When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the <code>.watches</code> index.</p>
197
+
186
198
 
187
199
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-delete-watch.html>`_
188
200
 
@@ -251,21 +263,19 @@ class WatcherClient(NamespacedClient):
251
263
  body: t.Optional[t.Dict[str, t.Any]] = None,
252
264
  ) -> ObjectApiResponse[t.Any]:
253
265
  """
254
- Run a watch. This API can be used to force execution of the watch outside of
255
- its triggering logic or to simulate the watch execution for debugging purposes.
256
- For testing and debugging purposes, you also have fine-grained control on how
257
- the watch runs. You can run the watch without running all of its actions or alternatively
258
- by simulating them. You can also force execution by ignoring the watch condition
259
- and control whether a watch record would be written to the watch history after
260
- it runs. You can use the run watch API to run watches that are not yet registered
261
- by specifying the watch definition inline. This serves as great tool for testing
262
- and debugging your watches prior to adding them to Watcher. When Elasticsearch
263
- security features are enabled on your cluster, watches are run with the privileges
264
- of the user that stored the watches. If your user is allowed to read index `a`,
265
- but not index `b`, then the exact same set of rules will apply during execution
266
- of a watch. When using the run watch API, the authorization data of the user
267
- that called the API will be used as a base, instead of the information who stored
268
- the watch.
266
+ .. raw:: html
267
+
268
+ <p>Run a watch.
269
+ This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.</p>
270
+ <p>For testing and debugging purposes, you also have fine-grained control on how the watch runs.
271
+ You can run the watch without running all of its actions or alternatively by simulating them.
272
+ You can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.</p>
273
+ <p>You can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.
274
+ This serves as great tool for testing and debugging your watches prior to adding them to Watcher.</p>
275
+ <p>When Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.
276
+ If your user is allowed to read index <code>a</code>, but not index <code>b</code>, then the exact same set of rules will apply during execution of a watch.</p>
277
+ <p>When using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.</p>
278
+
269
279
 
270
280
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-execute-watch.html>`_
271
281
 
@@ -348,9 +358,12 @@ class WatcherClient(NamespacedClient):
348
358
  pretty: t.Optional[bool] = None,
349
359
  ) -> ObjectApiResponse[t.Any]:
350
360
  """
351
- Get Watcher index settings. Get settings for the Watcher internal index (`.watches`).
352
- Only a subset of settings are shown, for example `index.auto_expand_replicas`
353
- and `index.number_of_replicas`.
361
+ .. raw:: html
362
+
363
+ <p>Get Watcher index settings.
364
+ Get settings for the Watcher internal index (<code>.watches</code>).
365
+ Only a subset of settings are shown, for example <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
366
+
354
367
 
355
368
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-get-settings.html>`_
356
369
 
@@ -392,7 +405,10 @@ class WatcherClient(NamespacedClient):
392
405
  pretty: t.Optional[bool] = None,
393
406
  ) -> ObjectApiResponse[t.Any]:
394
407
  """
395
- Get a watch.
408
+ .. raw:: html
409
+
410
+ <p>Get a watch.</p>
411
+
396
412
 
397
413
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-get-watch.html>`_
398
414
 
@@ -456,17 +472,18 @@ class WatcherClient(NamespacedClient):
456
472
  body: t.Optional[t.Dict[str, t.Any]] = None,
457
473
  ) -> ObjectApiResponse[t.Any]:
458
474
  """
459
- Create or update a watch. When a watch is registered, a new document that represents
460
- the watch is added to the `.watches` index and its trigger is immediately registered
461
- with the relevant trigger engine. Typically for the `schedule` trigger, the scheduler
462
- is the trigger engine. IMPORTANT: You must use Kibana or this API to create a
463
- watch. Do not add a watch directly to the `.watches` index by using the Elasticsearch
464
- index API. If Elasticsearch security features are enabled, do not give users
465
- write privileges on the `.watches` index. When you add a watch you can also define
466
- its initial active state by setting the *active* parameter. When Elasticsearch
467
- security features are enabled, your watch can index or search only on indices
468
- for which the user that stored the watch has privileges. If the user is able
469
- to read index `a`, but not index `b`, the same will apply when the watch runs.
475
+ .. raw:: html
476
+
477
+ <p>Create or update a watch.
478
+ When a watch is registered, a new document that represents the watch is added to the <code>.watches</code> index and its trigger is immediately registered with the relevant trigger engine.
479
+ Typically for the <code>schedule</code> trigger, the scheduler is the trigger engine.</p>
480
+ <p>IMPORTANT: You must use Kibana or this API to create a watch.
481
+ Do not add a watch directly to the <code>.watches</code> index by using the Elasticsearch index API.
482
+ If Elasticsearch security features are enabled, do not give users write privileges on the <code>.watches</code> index.</p>
483
+ <p>When you add a watch you can also define its initial active state by setting the <em>active</em> parameter.</p>
484
+ <p>When Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.
485
+ If the user is able to read index <code>a</code>, but not index <code>b</code>, the same will apply when the watch runs.</p>
486
+
470
487
 
471
488
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-put-watch.html>`_
472
489
 
@@ -574,9 +591,12 @@ class WatcherClient(NamespacedClient):
574
591
  body: t.Optional[t.Dict[str, t.Any]] = None,
575
592
  ) -> ObjectApiResponse[t.Any]:
576
593
  """
577
- Query watches. Get all registered watches in a paginated manner and optionally
578
- filter watches by a query. Note that only the `_id` and `metadata.*` fields are
579
- queryable or sortable.
594
+ .. raw:: html
595
+
596
+ <p>Query watches.
597
+ Get all registered watches in a paginated manner and optionally filter watches by a query.</p>
598
+ <p>Note that only the <code>_id</code> and <code>metadata.*</code> fields are queryable or sortable.</p>
599
+
580
600
 
581
601
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-query-watches.html>`_
582
602
 
@@ -646,7 +666,11 @@ class WatcherClient(NamespacedClient):
646
666
  pretty: t.Optional[bool] = None,
647
667
  ) -> ObjectApiResponse[t.Any]:
648
668
  """
649
- Start the watch service. Start the Watcher service if it is not already running.
669
+ .. raw:: html
670
+
671
+ <p>Start the watch service.
672
+ Start the Watcher service if it is not already running.</p>
673
+
650
674
 
651
675
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-start.html>`_
652
676
  """
@@ -703,8 +727,12 @@ class WatcherClient(NamespacedClient):
703
727
  pretty: t.Optional[bool] = None,
704
728
  ) -> ObjectApiResponse[t.Any]:
705
729
  """
706
- Get Watcher statistics. This API always returns basic metrics. You retrieve more
707
- metrics by using the metric parameter.
730
+ .. raw:: html
731
+
732
+ <p>Get Watcher statistics.
733
+ This API always returns basic metrics.
734
+ You retrieve more metrics by using the metric parameter.</p>
735
+
708
736
 
709
737
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-stats.html>`_
710
738
 
@@ -751,7 +779,11 @@ class WatcherClient(NamespacedClient):
751
779
  pretty: t.Optional[bool] = None,
752
780
  ) -> ObjectApiResponse[t.Any]:
753
781
  """
754
- Stop the watch service. Stop the Watcher service if it is running.
782
+ .. raw:: html
783
+
784
+ <p>Stop the watch service.
785
+ Stop the Watcher service if it is running.</p>
786
+
755
787
 
756
788
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-stop.html>`_
757
789
 
@@ -803,9 +835,13 @@ class WatcherClient(NamespacedClient):
803
835
  body: t.Optional[t.Dict[str, t.Any]] = None,
804
836
  ) -> ObjectApiResponse[t.Any]:
805
837
  """
806
- Update Watcher index settings. Update settings for the Watcher internal index
807
- (`.watches`). Only a subset of settings can be modified. This includes `index.auto_expand_replicas`
808
- and `index.number_of_replicas`.
838
+ .. raw:: html
839
+
840
+ <p>Update Watcher index settings.
841
+ Update settings for the Watcher internal index (<code>.watches</code>).
842
+ Only a subset of settings can be modified.
843
+ This includes <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
844
+
809
845
 
810
846
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-update-settings.html>`_
811
847
 
@@ -43,10 +43,16 @@ class XPackClient(NamespacedClient):
43
43
  pretty: t.Optional[bool] = None,
44
44
  ) -> ObjectApiResponse[t.Any]:
45
45
  """
46
- Get information. The information provided by the API includes: * Build information
47
- including the build number and timestamp. * License information about the currently
48
- installed license. * Feature information for the features that are currently
49
- enabled and available under the current license.
46
+ .. raw:: html
47
+
48
+ <p>Get information.
49
+ The information provided by the API includes:</p>
50
+ <ul>
51
+ <li>Build information including the build number and timestamp.</li>
52
+ <li>License information about the currently installed license.</li>
53
+ <li>Feature information for the features that are currently enabled and available under the current license.</li>
54
+ </ul>
55
+
50
56
 
51
57
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/info-api.html>`_
52
58
 
@@ -90,9 +96,12 @@ class XPackClient(NamespacedClient):
90
96
  pretty: t.Optional[bool] = None,
91
97
  ) -> ObjectApiResponse[t.Any]:
92
98
  """
93
- Get usage information. Get information about the features that are currently
94
- enabled and available under the current license. The API also provides some usage
95
- statistics.
99
+ .. raw:: html
100
+
101
+ <p>Get usage information.
102
+ Get information about the features that are currently enabled and available under the current license.
103
+ The API also provides some usage statistics.</p>
104
+
96
105
 
97
106
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/usage-api.html>`_
98
107
 
elasticsearch/_version.py CHANGED
@@ -15,4 +15,4 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- __versionstr__ = "8.17.1"
18
+ __versionstr__ = "8.17.2"
elasticsearch/client.py CHANGED
@@ -73,6 +73,8 @@ from ._sync.client.xpack import XPackClient as XPackClient # noqa: F401
73
73
  from ._utils import fixup_module_metadata
74
74
 
75
75
  # This file exists for backwards compatibility.
76
+ # We can't remove it as we use it for the Sphinx docs which show the full page, and we'd
77
+ # rather show `elasticsearch.client.FooClient` than `elasticsearch._sync.client.FooClient`.
76
78
  warnings.warn(
77
79
  "Importing from the 'elasticsearch.client' module is deprecated. "
78
80
  "Instead use 'elasticsearch' module for importing the client.",
@@ -593,7 +593,7 @@ def parallel_bulk(
593
593
 
594
594
  class BlockingPool(ThreadPool):
595
595
  def _setup_queues(self) -> None:
596
- super()._setup_queues() # type: ignore
596
+ super()._setup_queues() # type: ignore[misc]
597
597
  # The queue must be at least the size of the number of threads to
598
598
  # prevent hanging when inserting sentinel values during teardown.
599
599
  self._inqueue: Queue[
@@ -22,7 +22,10 @@ from typing import Any, Callable, Dict, List, Optional
22
22
  from elasticsearch import Elasticsearch
23
23
  from elasticsearch._version import __versionstr__ as lib_version
24
24
  from elasticsearch.helpers import BulkIndexError, bulk
25
- from elasticsearch.helpers.vectorstore import EmbeddingService, RetrievalStrategy
25
+ from elasticsearch.helpers.vectorstore import (
26
+ EmbeddingService,
27
+ RetrievalStrategy,
28
+ )
26
29
  from elasticsearch.helpers.vectorstore._utils import maximal_marginal_relevance
27
30
 
28
31
  logger = logging.getLogger(__name__)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elasticsearch
3
- Version: 8.17.1
3
+ Version: 8.17.2
4
4
  Summary: Python client for Elasticsearch
5
5
  Project-URL: Documentation, https://elasticsearch-py.readthedocs.io/
6
6
  Project-URL: Homepage, https://github.com/elastic/elasticsearch-py