elasticsearch 9.1.1__py3-none-any.whl → 9.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. elasticsearch/_async/client/__init__.py +69 -65
  2. elasticsearch/_async/client/async_search.py +3 -3
  3. elasticsearch/_async/client/autoscaling.py +8 -4
  4. elasticsearch/_async/client/cat.py +521 -27
  5. elasticsearch/_async/client/ccr.py +10 -10
  6. elasticsearch/_async/client/cluster.py +34 -33
  7. elasticsearch/_async/client/connector.py +45 -44
  8. elasticsearch/_async/client/dangling_indices.py +8 -12
  9. elasticsearch/_async/client/enrich.py +10 -10
  10. elasticsearch/_async/client/eql.py +10 -10
  11. elasticsearch/_async/client/esql.py +16 -16
  12. elasticsearch/_async/client/features.py +6 -6
  13. elasticsearch/_async/client/fleet.py +8 -12
  14. elasticsearch/_async/client/graph.py +3 -7
  15. elasticsearch/_async/client/ilm.py +20 -28
  16. elasticsearch/_async/client/indices.py +163 -169
  17. elasticsearch/_async/client/inference.py +41 -127
  18. elasticsearch/_async/client/ingest.py +9 -9
  19. elasticsearch/_async/client/license.py +5 -7
  20. elasticsearch/_async/client/logstash.py +7 -5
  21. elasticsearch/_async/client/migration.py +6 -6
  22. elasticsearch/_async/client/ml.py +125 -85
  23. elasticsearch/_async/client/monitoring.py +4 -3
  24. elasticsearch/_async/client/nodes.py +17 -17
  25. elasticsearch/_async/client/query_rules.py +16 -16
  26. elasticsearch/_async/client/rollup.py +21 -21
  27. elasticsearch/_async/client/search_application.py +19 -19
  28. elasticsearch/_async/client/searchable_snapshots.py +10 -10
  29. elasticsearch/_async/client/security.py +8 -7
  30. elasticsearch/_async/client/shutdown.py +14 -19
  31. elasticsearch/_async/client/simulate.py +4 -4
  32. elasticsearch/_async/client/slm.py +18 -22
  33. elasticsearch/_async/client/snapshot.py +20 -20
  34. elasticsearch/_async/client/sql.py +10 -10
  35. elasticsearch/_async/client/streams.py +186 -0
  36. elasticsearch/_async/client/synonyms.py +10 -10
  37. elasticsearch/_async/client/tasks.py +8 -8
  38. elasticsearch/_async/client/text_structure.py +13 -9
  39. elasticsearch/_async/client/transform.py +51 -12
  40. elasticsearch/_async/client/utils.py +4 -2
  41. elasticsearch/_async/client/watcher.py +27 -31
  42. elasticsearch/_async/client/xpack.py +6 -5
  43. elasticsearch/_async/helpers.py +58 -9
  44. elasticsearch/_sync/client/__init__.py +71 -65
  45. elasticsearch/_sync/client/async_search.py +3 -3
  46. elasticsearch/_sync/client/autoscaling.py +8 -4
  47. elasticsearch/_sync/client/cat.py +521 -27
  48. elasticsearch/_sync/client/ccr.py +10 -10
  49. elasticsearch/_sync/client/cluster.py +34 -33
  50. elasticsearch/_sync/client/connector.py +45 -44
  51. elasticsearch/_sync/client/dangling_indices.py +8 -12
  52. elasticsearch/_sync/client/enrich.py +10 -10
  53. elasticsearch/_sync/client/eql.py +10 -10
  54. elasticsearch/_sync/client/esql.py +16 -16
  55. elasticsearch/_sync/client/features.py +6 -6
  56. elasticsearch/_sync/client/fleet.py +8 -12
  57. elasticsearch/_sync/client/graph.py +3 -7
  58. elasticsearch/_sync/client/ilm.py +20 -28
  59. elasticsearch/_sync/client/indices.py +163 -169
  60. elasticsearch/_sync/client/inference.py +41 -127
  61. elasticsearch/_sync/client/ingest.py +9 -9
  62. elasticsearch/_sync/client/license.py +5 -7
  63. elasticsearch/_sync/client/logstash.py +7 -5
  64. elasticsearch/_sync/client/migration.py +6 -6
  65. elasticsearch/_sync/client/ml.py +125 -85
  66. elasticsearch/_sync/client/monitoring.py +4 -3
  67. elasticsearch/_sync/client/nodes.py +17 -17
  68. elasticsearch/_sync/client/query_rules.py +16 -16
  69. elasticsearch/_sync/client/rollup.py +21 -21
  70. elasticsearch/_sync/client/search_application.py +19 -19
  71. elasticsearch/_sync/client/searchable_snapshots.py +10 -10
  72. elasticsearch/_sync/client/security.py +8 -7
  73. elasticsearch/_sync/client/shutdown.py +14 -19
  74. elasticsearch/_sync/client/simulate.py +4 -4
  75. elasticsearch/_sync/client/slm.py +18 -22
  76. elasticsearch/_sync/client/snapshot.py +20 -20
  77. elasticsearch/_sync/client/sql.py +10 -10
  78. elasticsearch/_sync/client/streams.py +186 -0
  79. elasticsearch/_sync/client/synonyms.py +10 -10
  80. elasticsearch/_sync/client/tasks.py +8 -8
  81. elasticsearch/_sync/client/text_structure.py +13 -9
  82. elasticsearch/_sync/client/transform.py +51 -12
  83. elasticsearch/_sync/client/utils.py +16 -2
  84. elasticsearch/_sync/client/watcher.py +27 -31
  85. elasticsearch/_sync/client/xpack.py +6 -5
  86. elasticsearch/_version.py +2 -1
  87. elasticsearch/client.py +2 -0
  88. elasticsearch/compat.py +43 -1
  89. elasticsearch/dsl/__init__.py +28 -0
  90. elasticsearch/dsl/_async/document.py +4 -5
  91. elasticsearch/dsl/_async/index.py +1 -1
  92. elasticsearch/dsl/_async/search.py +2 -3
  93. elasticsearch/dsl/_sync/document.py +4 -5
  94. elasticsearch/dsl/_sync/index.py +1 -1
  95. elasticsearch/dsl/_sync/search.py +2 -3
  96. elasticsearch/dsl/aggs.py +100 -3
  97. elasticsearch/dsl/async_connections.py +1 -2
  98. elasticsearch/dsl/connections.py +1 -2
  99. elasticsearch/dsl/document_base.py +15 -0
  100. elasticsearch/dsl/field.py +12 -1
  101. elasticsearch/dsl/query.py +23 -0
  102. elasticsearch/dsl/response/__init__.py +3 -0
  103. elasticsearch/dsl/serializer.py +1 -2
  104. elasticsearch/dsl/types.py +185 -5
  105. elasticsearch/dsl/utils.py +1 -2
  106. elasticsearch/esql/esql.py +1 -1
  107. elasticsearch/esql/functions.py +2 -2
  108. elasticsearch/helpers/__init__.py +10 -1
  109. elasticsearch/helpers/actions.py +106 -33
  110. elasticsearch/helpers/vectorstore/__init__.py +7 -7
  111. elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
  112. elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
  113. elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
  114. elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
  115. elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
  116. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
  117. elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
  118. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
  119. {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/METADATA +2 -2
  120. elasticsearch-9.1.3.dist-info/RECORD +165 -0
  121. {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/WHEEL +1 -1
  122. elasticsearch-9.1.1.dist-info/RECORD +0 -163
  123. {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/licenses/LICENSE +0 -0
  124. {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/licenses/NOTICE +0 -0
@@ -74,6 +74,7 @@ from .slm import SlmClient
74
74
  from .snapshot import SnapshotClient
75
75
  from .sql import SqlClient
76
76
  from .ssl import SslClient
77
+ from .streams import StreamsClient
77
78
  from .synonyms import SynonymsClient
78
79
  from .tasks import TasksClient
79
80
  from .text_structure import TextStructureClient
@@ -83,9 +84,9 @@ from .utils import (
83
84
  CLIENT_META_SERVICE,
84
85
  SKIP_IN_PATH,
85
86
  Stability,
87
+ _availability_warning,
86
88
  _quote,
87
89
  _rewrite_parameters,
88
- _stability_warning,
89
90
  client_node_configs,
90
91
  is_requests_http_auth,
91
92
  is_requests_node_class,
@@ -378,6 +379,7 @@ class Elasticsearch(BaseClient):
378
379
  self.shutdown = ShutdownClient(self)
379
380
  self.sql = SqlClient(self)
380
381
  self.ssl = SslClient(self)
382
+ self.streams = StreamsClient(self)
381
383
  self.synonyms = SynonymsClient(self)
382
384
  self.text_structure = TextStructureClient(self)
383
385
  self.transform = TransformClient(self)
@@ -500,6 +502,7 @@ class Elasticsearch(BaseClient):
500
502
  """
501
503
  __path = "/"
502
504
  __query: t.Dict[str, t.Any] = {}
505
+ __path_parts: t.Dict[str, str] = {}
503
506
  if error_trace is not None:
504
507
  __query["error_trace"] = error_trace
505
508
  if filter_path is not None:
@@ -510,7 +513,14 @@ class Elasticsearch(BaseClient):
510
513
  __query["pretty"] = pretty
511
514
  __headers = {"accept": "application/json"}
512
515
  try:
513
- self.perform_request("HEAD", __path, params=__query, headers=__headers)
516
+ self.perform_request(
517
+ "HEAD",
518
+ __path,
519
+ params=__query,
520
+ headers=__headers,
521
+ endpoint_id="ping",
522
+ path_parts=__path_parts,
523
+ )
514
524
  return True
515
525
  except (ApiError, TransportError):
516
526
  return False
@@ -555,8 +565,8 @@ class Elasticsearch(BaseClient):
555
565
  """
556
566
  .. raw:: html
557
567
 
558
- <p>Bulk index or delete documents.
559
- Perform multiple <code>index</code>, <code>create</code>, <code>delete</code>, and <code>update</code> actions in a single request.
568
+ <p>Bulk index or delete documents.</p>
569
+ <p>Perform multiple <code>index</code>, <code>create</code>, <code>delete</code>, and <code>update</code> actions in a single request.
560
570
  This reduces overhead and can greatly increase indexing speed.</p>
561
571
  <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
562
572
  <ul>
@@ -761,8 +771,8 @@ class Elasticsearch(BaseClient):
761
771
  """
762
772
  .. raw:: html
763
773
 
764
- <p>Clear a scrolling search.
765
- Clear the search context and results for a scrolling search.</p>
774
+ <p>Clear a scrolling search.</p>
775
+ <p>Clear the search context and results for a scrolling search.</p>
766
776
 
767
777
 
768
778
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll>`_
@@ -815,8 +825,8 @@ class Elasticsearch(BaseClient):
815
825
  """
816
826
  .. raw:: html
817
827
 
818
- <p>Close a point in time.
819
- A point in time must be opened explicitly before being used in search requests.
828
+ <p>Close a point in time.</p>
829
+ <p>A point in time must be opened explicitly before being used in search requests.
820
830
  The <code>keep_alive</code> parameter tells Elasticsearch how long it should persist.
821
831
  A point in time is automatically closed when the <code>keep_alive</code> period has elapsed.
822
832
  However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>
@@ -843,11 +853,7 @@ class Elasticsearch(BaseClient):
843
853
  if not __body:
844
854
  if id is not None:
845
855
  __body["id"] = id
846
- if not __body:
847
- __body = None # type: ignore[assignment]
848
- __headers = {"accept": "application/json"}
849
- if __body is not None:
850
- __headers["content-type"] = "application/json"
856
+ __headers = {"accept": "application/json", "content-type": "application/json"}
851
857
  return self.perform_request( # type: ignore[return-value]
852
858
  "DELETE",
853
859
  __path,
@@ -896,8 +902,8 @@ class Elasticsearch(BaseClient):
896
902
  """
897
903
  .. raw:: html
898
904
 
899
- <p>Count search results.
900
- Get the number of documents matching a query.</p>
905
+ <p>Count search results.</p>
906
+ <p>Get the number of documents matching a query.</p>
901
907
  <p>The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
902
908
  The query is optional. When no query is provided, the API uses <code>match_all</code> to count all the documents.</p>
903
909
  <p>The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.</p>
@@ -1633,11 +1639,11 @@ class Elasticsearch(BaseClient):
1633
1639
  self,
1634
1640
  *,
1635
1641
  task_id: str,
1642
+ requests_per_second: float,
1636
1643
  error_trace: t.Optional[bool] = None,
1637
1644
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1638
1645
  human: t.Optional[bool] = None,
1639
1646
  pretty: t.Optional[bool] = None,
1640
- requests_per_second: t.Optional[float] = None,
1641
1647
  ) -> ObjectApiResponse[t.Any]:
1642
1648
  """
1643
1649
  .. raw:: html
@@ -1655,9 +1661,13 @@ class Elasticsearch(BaseClient):
1655
1661
  """
1656
1662
  if task_id in SKIP_IN_PATH:
1657
1663
  raise ValueError("Empty value passed for parameter 'task_id'")
1664
+ if requests_per_second is None:
1665
+ raise ValueError("Empty value passed for parameter 'requests_per_second'")
1658
1666
  __path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
1659
1667
  __path = f'/_delete_by_query/{__path_parts["task_id"]}/_rethrottle'
1660
1668
  __query: t.Dict[str, t.Any] = {}
1669
+ if requests_per_second is not None:
1670
+ __query["requests_per_second"] = requests_per_second
1661
1671
  if error_trace is not None:
1662
1672
  __query["error_trace"] = error_trace
1663
1673
  if filter_path is not None:
@@ -1666,8 +1676,6 @@ class Elasticsearch(BaseClient):
1666
1676
  __query["human"] = human
1667
1677
  if pretty is not None:
1668
1678
  __query["pretty"] = pretty
1669
- if requests_per_second is not None:
1670
- __query["requests_per_second"] = requests_per_second
1671
1679
  __headers = {"accept": "application/json"}
1672
1680
  return self.perform_request( # type: ignore[return-value]
1673
1681
  "POST",
@@ -1693,8 +1701,8 @@ class Elasticsearch(BaseClient):
1693
1701
  """
1694
1702
  .. raw:: html
1695
1703
 
1696
- <p>Delete a script or search template.
1697
- Deletes a stored script or search template.</p>
1704
+ <p>Delete a script or search template.</p>
1705
+ <p>Deletes a stored script or search template.</p>
1698
1706
 
1699
1707
 
1700
1708
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script>`_
@@ -2005,8 +2013,8 @@ class Elasticsearch(BaseClient):
2005
2013
  """
2006
2014
  .. raw:: html
2007
2015
 
2008
- <p>Explain a document match result.
2009
- Get information about why a specific document matches, or doesn't match, a query.
2016
+ <p>Explain a document match result.</p>
2017
+ <p>Get information about why a specific document matches, or doesn't match, a query.
2010
2018
  It computes a score explanation for a query and a specific document.</p>
2011
2019
 
2012
2020
 
@@ -2409,8 +2417,8 @@ class Elasticsearch(BaseClient):
2409
2417
  """
2410
2418
  .. raw:: html
2411
2419
 
2412
- <p>Get a script or search template.
2413
- Retrieves a stored script or search template.</p>
2420
+ <p>Get a script or search template.</p>
2421
+ <p>Retrieves a stored script or search template.</p>
2414
2422
 
2415
2423
 
2416
2424
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script>`_
@@ -2646,8 +2654,8 @@ class Elasticsearch(BaseClient):
2646
2654
  """
2647
2655
  .. raw:: html
2648
2656
 
2649
- <p>Get the cluster health.
2650
- Get a report with the health status of an Elasticsearch cluster.
2657
+ <p>Get the cluster health.</p>
2658
+ <p>Get a report with the health status of an Elasticsearch cluster.
2651
2659
  The report contains a list of indicators that compose Elasticsearch functionality.</p>
2652
2660
  <p>Each indicator has a health status of: green, unknown, yellow or red.
2653
2661
  The indicator will provide an explanation and metadata describing the reason for its current health status.</p>
@@ -2818,13 +2826,11 @@ class Elasticsearch(BaseClient):
2818
2826
  &quot;id&quot;: &quot;elkbee&quot;
2819
2827
  }
2820
2828
  }
2821
-
2822
- In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
2823
- If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).
2824
-
2825
- A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
2826
- Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.
2827
2829
  </code></pre>
2830
+ <p>In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
2831
+ If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).</p>
2832
+ <p>A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
2833
+ Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.</p>
2828
2834
 
2829
2835
 
2830
2836
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create>`_
@@ -2959,8 +2965,8 @@ class Elasticsearch(BaseClient):
2959
2965
  """
2960
2966
  .. raw:: html
2961
2967
 
2962
- <p>Get cluster info.
2963
- Get basic build, version, and cluster information.
2968
+ <p>Get cluster info.</p>
2969
+ <p>Get basic build, version, and cluster information.
2964
2970
  ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.</p>
2965
2971
 
2966
2972
 
@@ -3654,8 +3660,8 @@ class Elasticsearch(BaseClient):
3654
3660
  """
3655
3661
  .. raw:: html
3656
3662
 
3657
- <p>Create or update a script or search template.
3658
- Creates or updates a stored script or search template.</p>
3663
+ <p>Create or update a script or search template.</p>
3664
+ <p>Creates or updates a stored script or search template.</p>
3659
3665
 
3660
3666
 
3661
3667
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script>`_
@@ -3989,11 +3995,11 @@ class Elasticsearch(BaseClient):
3989
3995
  self,
3990
3996
  *,
3991
3997
  task_id: str,
3998
+ requests_per_second: float,
3992
3999
  error_trace: t.Optional[bool] = None,
3993
4000
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3994
4001
  human: t.Optional[bool] = None,
3995
4002
  pretty: t.Optional[bool] = None,
3996
- requests_per_second: t.Optional[float] = None,
3997
4003
  ) -> ObjectApiResponse[t.Any]:
3998
4004
  """
3999
4005
  .. raw:: html
@@ -4017,9 +4023,13 @@ class Elasticsearch(BaseClient):
4017
4023
  """
4018
4024
  if task_id in SKIP_IN_PATH:
4019
4025
  raise ValueError("Empty value passed for parameter 'task_id'")
4026
+ if requests_per_second is None:
4027
+ raise ValueError("Empty value passed for parameter 'requests_per_second'")
4020
4028
  __path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
4021
4029
  __path = f'/_reindex/{__path_parts["task_id"]}/_rethrottle'
4022
4030
  __query: t.Dict[str, t.Any] = {}
4031
+ if requests_per_second is not None:
4032
+ __query["requests_per_second"] = requests_per_second
4023
4033
  if error_trace is not None:
4024
4034
  __query["error_trace"] = error_trace
4025
4035
  if filter_path is not None:
@@ -4028,8 +4038,6 @@ class Elasticsearch(BaseClient):
4028
4038
  __query["human"] = human
4029
4039
  if pretty is not None:
4030
4040
  __query["pretty"] = pretty
4031
- if requests_per_second is not None:
4032
- __query["requests_per_second"] = requests_per_second
4033
4041
  __headers = {"accept": "application/json"}
4034
4042
  return self.perform_request( # type: ignore[return-value]
4035
4043
  "POST",
@@ -4099,11 +4107,7 @@ class Elasticsearch(BaseClient):
4099
4107
  __body["params"] = params
4100
4108
  if source is not None:
4101
4109
  __body["source"] = source
4102
- if not __body:
4103
- __body = None # type: ignore[assignment]
4104
- __headers = {"accept": "application/json"}
4105
- if __body is not None:
4106
- __headers["content-type"] = "application/json"
4110
+ __headers = {"accept": "application/json", "content-type": "application/json"}
4107
4111
  return self.perform_request( # type: ignore[return-value]
4108
4112
  "POST",
4109
4113
  __path,
@@ -4117,7 +4121,7 @@ class Elasticsearch(BaseClient):
4117
4121
  @_rewrite_parameters(
4118
4122
  body_fields=("context", "context_setup", "script"),
4119
4123
  )
4120
- @_stability_warning(Stability.EXPERIMENTAL)
4124
+ @_availability_warning(Stability.EXPERIMENTAL)
4121
4125
  def scripts_painless_execute(
4122
4126
  self,
4123
4127
  *,
@@ -4186,11 +4190,7 @@ class Elasticsearch(BaseClient):
4186
4190
  __body["context_setup"] = context_setup
4187
4191
  if script is not None:
4188
4192
  __body["script"] = script
4189
- if not __body:
4190
- __body = None # type: ignore[assignment]
4191
- __headers = {"accept": "application/json"}
4192
- if __body is not None:
4193
- __headers["content-type"] = "application/json"
4193
+ __headers = {"accept": "application/json", "content-type": "application/json"}
4194
4194
  return self.perform_request( # type: ignore[return-value]
4195
4195
  "POST",
4196
4196
  __path,
@@ -5142,11 +5142,19 @@ class Elasticsearch(BaseClient):
5142
5142
 
5143
5143
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt>`_
5144
5144
 
5145
- :param index: Comma-separated list of data streams, indices, or aliases to search
5146
- :param field: Field containing geospatial data to return
5147
- :param zoom: Zoom level for the vector tile to search
5148
- :param x: X coordinate for the vector tile to search
5149
- :param y: Y coordinate for the vector tile to search
5145
+ :param index: A list of indices, data streams, or aliases to search. It supports
5146
+ wildcards (`*`). To search all data streams and indices, omit this parameter
5147
+ or use `*` or `_all`. To search a remote cluster, use the `<cluster>:<target>`
5148
+ syntax.
5149
+ :param field: A field that contains the geospatial data to return. It must be
5150
+ a `geo_point` or `geo_shape` field. The field must have doc values enabled.
5151
+ It cannot be a nested field. NOTE: Vector tiles do not natively support geometry
5152
+ collections. For `geometrycollection` values in a `geo_shape` field, the
5153
+ API returns a hits layer feature for each element of the collection. This
5154
+ behavior may change in a future release.
5155
+ :param zoom: The zoom level of the vector tile to search. It accepts `0` to `29`.
5156
+ :param x: The X coordinate for the vector tile to search.
5157
+ :param y: The Y coordinate for the vector tile to search.
5150
5158
  :param aggs: Sub-aggregations for the geotile_grid. It supports the following
5151
5159
  aggregation types: - `avg` - `boxplot` - `cardinality` - `extended stats`
5152
5160
  - `max` - `median absolute deviation` - `min` - `percentile` - `percentile-rank`
@@ -5621,11 +5629,7 @@ class Elasticsearch(BaseClient):
5621
5629
  __body["string"] = string
5622
5630
  if timeout is not None:
5623
5631
  __body["timeout"] = timeout
5624
- if not __body:
5625
- __body = None # type: ignore[assignment]
5626
- __headers = {"accept": "application/json"}
5627
- if __body is not None:
5628
- __headers["content-type"] = "application/json"
5632
+ __headers = {"accept": "application/json", "content-type": "application/json"}
5629
5633
  return self.perform_request( # type: ignore[return-value]
5630
5634
  "POST",
5631
5635
  __path,
@@ -6060,8 +6064,8 @@ class Elasticsearch(BaseClient):
6060
6064
  """
6061
6065
  .. raw:: html
6062
6066
 
6063
- <p>Update documents.
6064
- Updates documents that match the specified query.
6067
+ <p>Update documents.</p>
6068
+ <p>Updates documents that match the specified query.
6065
6069
  If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.</p>
6066
6070
  <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:</p>
6067
6071
  <ul>
@@ -6340,11 +6344,11 @@ class Elasticsearch(BaseClient):
6340
6344
  self,
6341
6345
  *,
6342
6346
  task_id: str,
6347
+ requests_per_second: float,
6343
6348
  error_trace: t.Optional[bool] = None,
6344
6349
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
6345
6350
  human: t.Optional[bool] = None,
6346
6351
  pretty: t.Optional[bool] = None,
6347
- requests_per_second: t.Optional[float] = None,
6348
6352
  ) -> ObjectApiResponse[t.Any]:
6349
6353
  """
6350
6354
  .. raw:: html
@@ -6362,9 +6366,13 @@ class Elasticsearch(BaseClient):
6362
6366
  """
6363
6367
  if task_id in SKIP_IN_PATH:
6364
6368
  raise ValueError("Empty value passed for parameter 'task_id'")
6369
+ if requests_per_second is None:
6370
+ raise ValueError("Empty value passed for parameter 'requests_per_second'")
6365
6371
  __path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
6366
6372
  __path = f'/_update_by_query/{__path_parts["task_id"]}/_rethrottle'
6367
6373
  __query: t.Dict[str, t.Any] = {}
6374
+ if requests_per_second is not None:
6375
+ __query["requests_per_second"] = requests_per_second
6368
6376
  if error_trace is not None:
6369
6377
  __query["error_trace"] = error_trace
6370
6378
  if filter_path is not None:
@@ -6373,8 +6381,6 @@ class Elasticsearch(BaseClient):
6373
6381
  __query["human"] = human
6374
6382
  if pretty is not None:
6375
6383
  __query["pretty"] = pretty
6376
- if requests_per_second is not None:
6377
- __query["requests_per_second"] = requests_per_second
6378
6384
  __headers = {"accept": "application/json"}
6379
6385
  return self.perform_request( # type: ignore[return-value]
6380
6386
  "POST",
@@ -357,7 +357,7 @@ class AsyncSearchClient(NamespacedClient):
357
357
  :param allow_partial_search_results: Indicate if an error should be returned
358
358
  if there is a partial search failure or timeout
359
359
  :param analyze_wildcard: Specify whether wildcard and prefix queries should be
360
- analyzed (default: false)
360
+ analyzed
361
361
  :param analyzer: The analyzer to use for the query string
362
362
  :param batched_reduce_size: Affects how often partial results become available,
363
363
  which happens whenever shard results are reduced. A partial reduction is
@@ -373,7 +373,7 @@ class AsyncSearchClient(NamespacedClient):
373
373
  values for field names matching these patterns in the hits.fields property
374
374
  of the response.
375
375
  :param expand_wildcards: Whether to expand wildcard expression to concrete indices
376
- that are open, closed or both.
376
+ that are open, closed or both
377
377
  :param explain: If true, returns detailed information about score computation
378
378
  as part of a hit.
379
379
  :param ext: Configuration of search extensions defined by Elasticsearch plugins.
@@ -406,7 +406,7 @@ class AsyncSearchClient(NamespacedClient):
406
406
  you cannot specify an <index> in the request path.
407
407
  :param post_filter:
408
408
  :param preference: Specify the node or shard the operation should be performed
409
- on (default: random)
409
+ on
410
410
  :param profile:
411
411
  :param q: Query in the Lucene query string syntax
412
412
  :param query: Defines the search definition using the Query DSL.
@@ -20,7 +20,11 @@ import typing as t
20
20
  from elastic_transport import ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
23
+ from .utils import (
24
+ SKIP_IN_PATH,
25
+ _quote,
26
+ _rewrite_parameters,
27
+ )
24
28
 
25
29
 
26
30
  class AutoscalingClient(NamespacedClient):
@@ -46,7 +50,7 @@ class AutoscalingClient(NamespacedClient):
46
50
 
47
51
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy>`_
48
52
 
49
- :param name: the name of the autoscaling policy
53
+ :param name: Name of the autoscaling policy
50
54
  :param master_timeout: Period to wait for a connection to the master node. If
51
55
  no response is received before the timeout expires, the request fails and
52
56
  returns an error.
@@ -153,7 +157,7 @@ class AutoscalingClient(NamespacedClient):
153
157
 
154
158
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity>`_
155
159
 
156
- :param name: the name of the autoscaling policy
160
+ :param name: Name of the autoscaling policy
157
161
  :param master_timeout: Period to wait for a connection to the master node. If
158
162
  no response is received before the timeout expires, the request fails and
159
163
  returns an error.
@@ -208,7 +212,7 @@ class AutoscalingClient(NamespacedClient):
208
212
 
209
213
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy>`_
210
214
 
211
- :param name: the name of the autoscaling policy
215
+ :param name: Name of the autoscaling policy
212
216
  :param policy:
213
217
  :param master_timeout: Period to wait for a connection to the master node. If
214
218
  no response is received before the timeout expires, the request fails and