elasticsearch 8.16.0__py3-none-any.whl → 8.17.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 +82 -46
  2. elasticsearch/_async/client/async_search.py +12 -22
  3. elasticsearch/_async/client/autoscaling.py +39 -4
  4. elasticsearch/_async/client/cat.py +26 -26
  5. elasticsearch/_async/client/ccr.py +85 -35
  6. elasticsearch/_async/client/cluster.py +141 -49
  7. elasticsearch/_async/client/connector.py +25 -25
  8. elasticsearch/_async/client/dangling_indices.py +3 -3
  9. elasticsearch/_async/client/enrich.py +6 -6
  10. elasticsearch/_async/client/eql.py +13 -11
  11. elasticsearch/_async/client/esql.py +3 -2
  12. elasticsearch/_async/client/features.py +27 -5
  13. elasticsearch/_async/client/fleet.py +1 -1
  14. elasticsearch/_async/client/graph.py +9 -3
  15. elasticsearch/_async/client/ilm.py +69 -34
  16. elasticsearch/_async/client/indices.py +307 -105
  17. elasticsearch/_async/client/inference.py +5 -15
  18. elasticsearch/_async/client/ingest.py +28 -23
  19. elasticsearch/_async/client/license.py +38 -22
  20. elasticsearch/_async/client/logstash.py +3 -3
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +125 -73
  23. elasticsearch/_async/client/monitoring.py +1 -1
  24. elasticsearch/_async/client/nodes.py +34 -20
  25. elasticsearch/_async/client/query_rules.py +17 -16
  26. elasticsearch/_async/client/rollup.py +8 -8
  27. elasticsearch/_async/client/search_application.py +8 -8
  28. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  29. elasticsearch/_async/client/security.py +64 -57
  30. elasticsearch/_async/client/slm.py +9 -9
  31. elasticsearch/_async/client/snapshot.py +12 -12
  32. elasticsearch/_async/client/sql.py +16 -15
  33. elasticsearch/_async/client/ssl.py +1 -1
  34. elasticsearch/_async/client/synonyms.py +17 -14
  35. elasticsearch/_async/client/tasks.py +3 -3
  36. elasticsearch/_async/client/text_structure.py +2 -2
  37. elasticsearch/_async/client/transform.py +11 -11
  38. elasticsearch/_async/client/watcher.py +11 -11
  39. elasticsearch/_async/client/xpack.py +2 -2
  40. elasticsearch/_sync/client/__init__.py +82 -46
  41. elasticsearch/_sync/client/async_search.py +12 -22
  42. elasticsearch/_sync/client/autoscaling.py +39 -4
  43. elasticsearch/_sync/client/cat.py +26 -26
  44. elasticsearch/_sync/client/ccr.py +85 -35
  45. elasticsearch/_sync/client/cluster.py +141 -49
  46. elasticsearch/_sync/client/connector.py +25 -25
  47. elasticsearch/_sync/client/dangling_indices.py +3 -3
  48. elasticsearch/_sync/client/enrich.py +6 -6
  49. elasticsearch/_sync/client/eql.py +13 -11
  50. elasticsearch/_sync/client/esql.py +3 -2
  51. elasticsearch/_sync/client/features.py +27 -5
  52. elasticsearch/_sync/client/fleet.py +1 -1
  53. elasticsearch/_sync/client/graph.py +9 -3
  54. elasticsearch/_sync/client/ilm.py +69 -34
  55. elasticsearch/_sync/client/indices.py +307 -105
  56. elasticsearch/_sync/client/inference.py +5 -15
  57. elasticsearch/_sync/client/ingest.py +28 -23
  58. elasticsearch/_sync/client/license.py +38 -22
  59. elasticsearch/_sync/client/logstash.py +3 -3
  60. elasticsearch/_sync/client/migration.py +3 -3
  61. elasticsearch/_sync/client/ml.py +125 -73
  62. elasticsearch/_sync/client/monitoring.py +1 -1
  63. elasticsearch/_sync/client/nodes.py +34 -20
  64. elasticsearch/_sync/client/query_rules.py +17 -16
  65. elasticsearch/_sync/client/rollup.py +8 -8
  66. elasticsearch/_sync/client/search_application.py +8 -8
  67. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  68. elasticsearch/_sync/client/security.py +64 -57
  69. elasticsearch/_sync/client/slm.py +9 -9
  70. elasticsearch/_sync/client/snapshot.py +12 -12
  71. elasticsearch/_sync/client/sql.py +16 -15
  72. elasticsearch/_sync/client/ssl.py +1 -1
  73. elasticsearch/_sync/client/synonyms.py +17 -14
  74. elasticsearch/_sync/client/tasks.py +3 -3
  75. elasticsearch/_sync/client/text_structure.py +2 -2
  76. elasticsearch/_sync/client/transform.py +11 -11
  77. elasticsearch/_sync/client/watcher.py +11 -11
  78. elasticsearch/_sync/client/xpack.py +2 -2
  79. elasticsearch/_version.py +1 -1
  80. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.0.dist-info}/METADATA +6 -4
  81. elasticsearch-8.17.0.dist-info/RECORD +117 -0
  82. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.0.dist-info}/WHEEL +1 -1
  83. elasticsearch-8.16.0.dist-info/RECORD +0 -117
  84. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.0.dist-info}/licenses/LICENSE +0 -0
  85. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.0.dist-info}/licenses/NOTICE +0 -0
@@ -626,12 +626,14 @@ class AsyncElasticsearch(BaseClient):
626
626
  error_trace: t.Optional[bool] = None,
627
627
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
628
628
  human: t.Optional[bool] = None,
629
+ list_executed_pipelines: t.Optional[bool] = None,
629
630
  pipeline: t.Optional[str] = None,
630
631
  pretty: t.Optional[bool] = None,
631
632
  refresh: t.Optional[
632
633
  t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
633
634
  ] = None,
634
635
  require_alias: t.Optional[bool] = None,
636
+ require_data_stream: t.Optional[bool] = None,
635
637
  routing: t.Optional[str] = None,
636
638
  source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
637
639
  source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -646,11 +648,13 @@ class AsyncElasticsearch(BaseClient):
646
648
  in a single API call. This reduces overhead and can greatly increase indexing
647
649
  speed.
648
650
 
649
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-bulk.html>`_
651
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-bulk.html>`_
650
652
 
651
653
  :param operations:
652
654
  :param index: Name of the data stream, index, or index alias to perform bulk
653
655
  actions on.
656
+ :param list_executed_pipelines: If `true`, the response will include the ingest
657
+ pipelines that were executed for each index or create.
654
658
  :param pipeline: ID of the pipeline to use to preprocess incoming documents.
655
659
  If the index has a default ingest pipeline specified, then setting the value
656
660
  to `_none` disables the default ingest pipeline for this request. If a final
@@ -661,6 +665,8 @@ class AsyncElasticsearch(BaseClient):
661
665
  make this operation visible to search, if `false` do nothing with refreshes.
662
666
  Valid values: `true`, `false`, `wait_for`.
663
667
  :param require_alias: If `true`, the request’s actions must target an index alias.
668
+ :param require_data_stream: If `true`, the request's actions must target a data
669
+ stream (existing or to-be-created).
664
670
  :param routing: Custom value used to route operations to a specific shard.
665
671
  :param source: `true` or `false` to return the `_source` field or not, or a list
666
672
  of fields to return.
@@ -694,6 +700,8 @@ class AsyncElasticsearch(BaseClient):
694
700
  __query["filter_path"] = filter_path
695
701
  if human is not None:
696
702
  __query["human"] = human
703
+ if list_executed_pipelines is not None:
704
+ __query["list_executed_pipelines"] = list_executed_pipelines
697
705
  if pipeline is not None:
698
706
  __query["pipeline"] = pipeline
699
707
  if pretty is not None:
@@ -702,6 +710,8 @@ class AsyncElasticsearch(BaseClient):
702
710
  __query["refresh"] = refresh
703
711
  if require_alias is not None:
704
712
  __query["require_alias"] = require_alias
713
+ if require_data_stream is not None:
714
+ __query["require_data_stream"] = require_data_stream
705
715
  if routing is not None:
706
716
  __query["routing"] = routing
707
717
  if source is not None:
@@ -746,7 +756,7 @@ class AsyncElasticsearch(BaseClient):
746
756
  Clear a scrolling search. Clear the search context and results for a scrolling
747
757
  search.
748
758
 
749
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/clear-scroll-api.html>`_
759
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-scroll-api.html>`_
750
760
 
751
761
  :param scroll_id: Scroll IDs to clear. To clear all scroll IDs, use `_all`.
752
762
  """
@@ -800,7 +810,7 @@ class AsyncElasticsearch(BaseClient):
800
810
  period has elapsed. However, keeping points in time has a cost; close them as
801
811
  soon as they are no longer required for search requests.
802
812
 
803
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
813
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/point-in-time-api.html>`_
804
814
 
805
815
  :param id: The ID of the point-in-time.
806
816
  """
@@ -872,9 +882,9 @@ class AsyncElasticsearch(BaseClient):
872
882
  body: t.Optional[t.Dict[str, t.Any]] = None,
873
883
  ) -> ObjectApiResponse[t.Any]:
874
884
  """
875
- Returns number of documents matching a query.
885
+ Count search results. Get the number of documents matching a query.
876
886
 
877
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-count.html>`_
887
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-count.html>`_
878
888
 
879
889
  :param index: Comma-separated list of data streams, indices, and aliases to search.
880
890
  Supports wildcards (`*`). To search all data streams and indices, omit this
@@ -1009,7 +1019,7 @@ class AsyncElasticsearch(BaseClient):
1009
1019
  and makes it searchable. If the target is an index and the document already exists,
1010
1020
  the request updates the document and increments its version.
1011
1021
 
1012
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-index_.html>`_
1022
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-index_.html>`_
1013
1023
 
1014
1024
  :param index: Name of the data stream or index to target. If the target doesn’t
1015
1025
  exist and matches the name or wildcard (`*`) pattern of an index template
@@ -1113,7 +1123,7 @@ class AsyncElasticsearch(BaseClient):
1113
1123
  """
1114
1124
  Delete a document. Removes a JSON document from the specified index.
1115
1125
 
1116
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete.html>`_
1126
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete.html>`_
1117
1127
 
1118
1128
  :param index: Name of the target index.
1119
1129
  :param id: Unique identifier for the document.
@@ -1235,7 +1245,7 @@ class AsyncElasticsearch(BaseClient):
1235
1245
  """
1236
1246
  Delete documents. Deletes documents that match the specified query.
1237
1247
 
1238
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete-by-query.html>`_
1248
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete-by-query.html>`_
1239
1249
 
1240
1250
  :param index: Comma-separated list of data streams, indices, and aliases to search.
1241
1251
  Supports wildcards (`*`). To search all data streams or indices, omit this
@@ -1416,7 +1426,7 @@ class AsyncElasticsearch(BaseClient):
1416
1426
  takes effect immediately but rethrotting that slows down the query takes effect
1417
1427
  after completing the current batch to prevent scroll timeouts.
1418
1428
 
1419
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete-by-query.html>`_
1429
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete-by-query.html>`_
1420
1430
 
1421
1431
  :param task_id: The ID for the task.
1422
1432
  :param requests_per_second: The throttle for this request in sub-requests per
@@ -1462,7 +1472,7 @@ class AsyncElasticsearch(BaseClient):
1462
1472
  """
1463
1473
  Delete a script or search template. Deletes a stored script or search template.
1464
1474
 
1465
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
1475
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
1466
1476
 
1467
1477
  :param id: Identifier for the stored script or search template.
1468
1478
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -1530,7 +1540,7 @@ class AsyncElasticsearch(BaseClient):
1530
1540
  """
1531
1541
  Check a document. Checks if a specified document exists.
1532
1542
 
1533
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
1543
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
1534
1544
 
1535
1545
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1536
1546
  wildcards (`*`).
@@ -1631,7 +1641,7 @@ class AsyncElasticsearch(BaseClient):
1631
1641
  """
1632
1642
  Check for a document source. Checks if a document's `_source` is stored.
1633
1643
 
1634
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
1644
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
1635
1645
 
1636
1646
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1637
1647
  wildcards (`*`).
@@ -1732,7 +1742,7 @@ class AsyncElasticsearch(BaseClient):
1732
1742
  Explain a document match result. Returns information about why a specific document
1733
1743
  matches, or doesn’t match, a query.
1734
1744
 
1735
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-explain.html>`_
1745
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-explain.html>`_
1736
1746
 
1737
1747
  :param index: Index names used to limit the request. Only a single index name
1738
1748
  can be provided to this parameter.
@@ -1855,7 +1865,7 @@ class AsyncElasticsearch(BaseClient):
1855
1865
  field. For example, a runtime field with a type of keyword is returned the same
1856
1866
  as any other field that belongs to the `keyword` family.
1857
1867
 
1858
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-field-caps.html>`_
1868
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-field-caps.html>`_
1859
1869
 
1860
1870
  :param index: Comma-separated list of data streams, indices, and aliases used
1861
1871
  to limit the request. Supports wildcards (*). To target all data streams
@@ -1972,7 +1982,7 @@ class AsyncElasticsearch(BaseClient):
1972
1982
  Get a document by its ID. Retrieves the document with the specified ID from an
1973
1983
  index.
1974
1984
 
1975
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
1985
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
1976
1986
 
1977
1987
  :param index: Name of the index that contains the document.
1978
1988
  :param id: Unique identifier of the document.
@@ -2061,7 +2071,7 @@ class AsyncElasticsearch(BaseClient):
2061
2071
  """
2062
2072
  Get a script or search template. Retrieves a stored script or search template.
2063
2073
 
2064
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
2074
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
2065
2075
 
2066
2076
  :param id: Identifier for the stored script or search template.
2067
2077
  :param master_timeout: Specify timeout for connection to master
@@ -2103,7 +2113,7 @@ class AsyncElasticsearch(BaseClient):
2103
2113
  """
2104
2114
  Get script contexts. Get a list of supported script contexts and their methods.
2105
2115
 
2106
- `<https://www.elastic.co/guide/en/elasticsearch/painless/8.16/painless-contexts.html>`_
2116
+ `<https://www.elastic.co/guide/en/elasticsearch/painless/8.17/painless-contexts.html>`_
2107
2117
  """
2108
2118
  __path_parts: t.Dict[str, str] = {}
2109
2119
  __path = "/_script_context"
@@ -2138,7 +2148,7 @@ class AsyncElasticsearch(BaseClient):
2138
2148
  """
2139
2149
  Get script languages. Get a list of available script types, languages, and contexts.
2140
2150
 
2141
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
2151
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
2142
2152
  """
2143
2153
  __path_parts: t.Dict[str, str] = {}
2144
2154
  __path = "/_script_language"
@@ -2193,7 +2203,7 @@ class AsyncElasticsearch(BaseClient):
2193
2203
  """
2194
2204
  Get a document's source. Returns the source of a document.
2195
2205
 
2196
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
2206
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
2197
2207
 
2198
2208
  :param index: Name of the index that contains the document.
2199
2209
  :param id: Unique identifier of the document.
@@ -2274,9 +2284,28 @@ class AsyncElasticsearch(BaseClient):
2274
2284
  verbose: t.Optional[bool] = None,
2275
2285
  ) -> ObjectApiResponse[t.Any]:
2276
2286
  """
2277
- Returns the health of the cluster.
2278
-
2279
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/health-api.html>`_
2287
+ Get the cluster health. Get a report with the health status of an Elasticsearch
2288
+ cluster. The report contains a list of indicators that compose Elasticsearch
2289
+ functionality. Each indicator has a health status of: green, unknown, yellow
2290
+ or red. The indicator will provide an explanation and metadata describing the
2291
+ reason for its current health status. The cluster’s status is controlled by the
2292
+ worst indicator status. In the event that an indicator’s status is non-green,
2293
+ a list of impacts may be present in the indicator result which detail the functionalities
2294
+ that are negatively affected by the health issue. Each impact carries with it
2295
+ a severity level, an area of the system that is affected, and a simple description
2296
+ of the impact on the system. Some health indicators can determine the root cause
2297
+ of a health problem and prescribe a set of steps that can be performed in order
2298
+ to improve the health of the system. The root cause and remediation steps are
2299
+ encapsulated in a diagnosis. A diagnosis contains a cause detailing a root cause
2300
+ analysis, an action containing a brief description of the steps to take to fix
2301
+ the problem, the list of affected resources (if applicable), and a detailed step-by-step
2302
+ troubleshooting guide to fix the diagnosed problem. NOTE: The health indicators
2303
+ perform root cause analysis of non-green health statuses. This can be computationally
2304
+ expensive when called frequently. When setting up automated polling of the API
2305
+ for health status, set verbose to false to disable the more expensive analysis
2306
+ logic.
2307
+
2308
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/health-api.html>`_
2280
2309
 
2281
2310
  :param feature: A feature of the cluster, as returned by the top-level health
2282
2311
  report API.
@@ -2353,7 +2382,7 @@ class AsyncElasticsearch(BaseClient):
2353
2382
  and makes it searchable. If the target is an index and the document already exists,
2354
2383
  the request updates the document and increments its version.
2355
2384
 
2356
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-index_.html>`_
2385
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-index_.html>`_
2357
2386
 
2358
2387
  :param index: Name of the data stream or index to target.
2359
2388
  :param document:
@@ -2462,7 +2491,7 @@ class AsyncElasticsearch(BaseClient):
2462
2491
  """
2463
2492
  Get cluster info. Returns basic information about the cluster.
2464
2493
 
2465
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/index.html>`_
2494
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index.html>`_
2466
2495
  """
2467
2496
  __path_parts: t.Dict[str, str] = {}
2468
2497
  __path = "/"
@@ -2527,7 +2556,7 @@ class AsyncElasticsearch(BaseClient):
2527
2556
  The kNN search API supports restricting the search using a filter. The search
2528
2557
  will return the top k documents that also match the filter query.
2529
2558
 
2530
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
2559
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-search.html>`_
2531
2560
 
2532
2561
  :param index: A comma-separated list of index names to search; use `_all` or
2533
2562
  to perform the operation on all indices
@@ -2631,7 +2660,7 @@ class AsyncElasticsearch(BaseClient):
2631
2660
  IDs in the request body. To ensure fast responses, this multi get (mget) API
2632
2661
  responds with partial results if one or more shards fail.
2633
2662
 
2634
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-multi-get.html>`_
2663
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-multi-get.html>`_
2635
2664
 
2636
2665
  :param index: Name of the index to retrieve documents from when `ids` are specified,
2637
2666
  or when a document in the `docs` array does not specify an index.
@@ -2758,7 +2787,7 @@ class AsyncElasticsearch(BaseClient):
2758
2787
  Each newline character may be preceded by a carriage return `\\r`. When sending
2759
2788
  requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.
2760
2789
 
2761
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-multi-search.html>`_
2790
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-multi-search.html>`_
2762
2791
 
2763
2792
  :param searches:
2764
2793
  :param index: Comma-separated list of data streams, indices, and index aliases
@@ -2890,7 +2919,7 @@ class AsyncElasticsearch(BaseClient):
2890
2919
  """
2891
2920
  Run multiple templated searches.
2892
2921
 
2893
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-multi-search.html>`_
2922
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-multi-search.html>`_
2894
2923
 
2895
2924
  :param search_templates:
2896
2925
  :param index: Comma-separated list of data streams, indices, and aliases to search.
@@ -2989,7 +3018,7 @@ class AsyncElasticsearch(BaseClient):
2989
3018
  with all the fetched termvectors. Each element has the structure provided by
2990
3019
  the termvectors API.
2991
3020
 
2992
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-multi-termvectors.html>`_
3021
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-multi-termvectors.html>`_
2993
3022
 
2994
3023
  :param index: Name of the index that contains the documents.
2995
3024
  :param docs: Array of existing or artificial documents.
@@ -3079,6 +3108,7 @@ class AsyncElasticsearch(BaseClient):
3079
3108
  *,
3080
3109
  index: t.Union[str, t.Sequence[str]],
3081
3110
  keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]],
3111
+ allow_partial_search_results: t.Optional[bool] = None,
3082
3112
  error_trace: t.Optional[bool] = None,
3083
3113
  expand_wildcards: t.Optional[
3084
3114
  t.Union[
@@ -3108,11 +3138,15 @@ class AsyncElasticsearch(BaseClient):
3108
3138
  A point in time must be opened explicitly before being used in search requests.
3109
3139
  The `keep_alive` parameter tells Elasticsearch how long it should persist.
3110
3140
 
3111
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
3141
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/point-in-time-api.html>`_
3112
3142
 
3113
3143
  :param index: A comma-separated list of index names to open point in time; use
3114
3144
  `_all` or empty string to perform the operation on all indices
3115
3145
  :param keep_alive: Extends the time to live of the corresponding point in time.
3146
+ :param allow_partial_search_results: If `false`, creating a point in time request
3147
+ when a shard is missing or unavailable will throw an exception. If `true`,
3148
+ the point in time will contain all the shards that are available at the time
3149
+ of the request.
3116
3150
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
3117
3151
  request can target data streams, this argument determines whether wildcard
3118
3152
  expressions match hidden data streams. Supports comma-separated values, such
@@ -3135,6 +3169,8 @@ class AsyncElasticsearch(BaseClient):
3135
3169
  __body: t.Dict[str, t.Any] = body if body is not None else {}
3136
3170
  if keep_alive is not None:
3137
3171
  __query["keep_alive"] = keep_alive
3172
+ if allow_partial_search_results is not None:
3173
+ __query["allow_partial_search_results"] = allow_partial_search_results
3138
3174
  if error_trace is not None:
3139
3175
  __query["error_trace"] = error_trace
3140
3176
  if expand_wildcards is not None:
@@ -3190,7 +3226,7 @@ class AsyncElasticsearch(BaseClient):
3190
3226
  Create or update a script or search template. Creates or updates a stored script
3191
3227
  or search template.
3192
3228
 
3193
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
3229
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
3194
3230
 
3195
3231
  :param id: Identifier for the stored script or search template. Must be unique
3196
3232
  within the cluster.
@@ -3276,7 +3312,7 @@ class AsyncElasticsearch(BaseClient):
3276
3312
  Evaluate ranked search results. Evaluate the quality of ranked search results
3277
3313
  over a set of typical search queries.
3278
3314
 
3279
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-rank-eval.html>`_
3315
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-rank-eval.html>`_
3280
3316
 
3281
3317
  :param requests: A set of typical search requests, together with their provided
3282
3318
  ratings.
@@ -3372,7 +3408,7 @@ class AsyncElasticsearch(BaseClient):
3372
3408
  can be any existing index, alias, or data stream. The destination must differ
3373
3409
  from the source. For example, you cannot reindex a data stream into itself.
3374
3410
 
3375
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-reindex.html>`_
3411
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-reindex.html>`_
3376
3412
 
3377
3413
  :param dest: The destination you are copying to.
3378
3414
  :param source: The source you are copying from.
@@ -3469,7 +3505,7 @@ class AsyncElasticsearch(BaseClient):
3469
3505
  Throttle a reindex operation. Change the number of requests per second for a
3470
3506
  particular reindex operation.
3471
3507
 
3472
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-reindex.html>`_
3508
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-reindex.html>`_
3473
3509
 
3474
3510
  :param task_id: Identifier for the task.
3475
3511
  :param requests_per_second: The throttle for this request in sub-requests per
@@ -3520,7 +3556,7 @@ class AsyncElasticsearch(BaseClient):
3520
3556
  """
3521
3557
  Render a search template. Render a search template as a search request body.
3522
3558
 
3523
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/render-search-template-api.html>`_
3559
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/render-search-template-api.html>`_
3524
3560
 
3525
3561
  :param id: ID of the search template to render. If no `source` is specified,
3526
3562
  this or the `id` request body parameter is required.
@@ -3589,7 +3625,7 @@ class AsyncElasticsearch(BaseClient):
3589
3625
  """
3590
3626
  Run a script. Runs a script and returns a result.
3591
3627
 
3592
- `<https://www.elastic.co/guide/en/elasticsearch/painless/8.16/painless-execute-api.html>`_
3628
+ `<https://www.elastic.co/guide/en/elasticsearch/painless/8.17/painless-execute-api.html>`_
3593
3629
 
3594
3630
  :param context: The context that the script should run in.
3595
3631
  :param context_setup: Additional parameters for the `context`.
@@ -3662,7 +3698,7 @@ class AsyncElasticsearch(BaseClient):
3662
3698
  of the index at the time of the initial search request. Subsequent indexing or
3663
3699
  document changes only affect later search and scroll requests.
3664
3700
 
3665
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-request-body.html#request-body-search-scroll>`_
3701
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-request-body.html#request-body-search-scroll>`_
3666
3702
 
3667
3703
  :param scroll_id: Scroll ID of the search.
3668
3704
  :param rest_total_hits_as_int: If true, the API response’s hit.total property
@@ -3854,7 +3890,7 @@ class AsyncElasticsearch(BaseClient):
3854
3890
  can provide search queries using the `q` query string parameter or the request
3855
3891
  body. If both are specified, only the query parameter is used.
3856
3892
 
3857
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
3893
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-search.html>`_
3858
3894
 
3859
3895
  :param index: Comma-separated list of data streams, indices, and aliases to search.
3860
3896
  Supports wildcards (`*`). To search all data streams and indices, omit this
@@ -4284,7 +4320,7 @@ class AsyncElasticsearch(BaseClient):
4284
4320
  """
4285
4321
  Search a vector tile. Search a vector tile for geospatial values.
4286
4322
 
4287
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-vector-tile-api.html>`_
4323
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-vector-tile-api.html>`_
4288
4324
 
4289
4325
  :param index: Comma-separated list of data streams, indices, or aliases to search
4290
4326
  :param field: Field containing geospatial data to return
@@ -4441,7 +4477,7 @@ class AsyncElasticsearch(BaseClient):
4441
4477
  optimizations with routing and shard preferences. When filtered aliases are used,
4442
4478
  the filter is returned as part of the indices section.
4443
4479
 
4444
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-shards.html>`_
4480
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-shards.html>`_
4445
4481
 
4446
4482
  :param index: Returns the indices and shards that a search request would be executed
4447
4483
  against.
@@ -4542,7 +4578,7 @@ class AsyncElasticsearch(BaseClient):
4542
4578
  """
4543
4579
  Run a search with a search template.
4544
4580
 
4545
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-template.html>`_
4581
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-template.html>`_
4546
4582
 
4547
4583
  :param index: Comma-separated list of data streams, indices, and aliases to search.
4548
4584
  Supports wildcards (*).
@@ -4682,7 +4718,7 @@ class AsyncElasticsearch(BaseClient):
4682
4718
  are actually deleted. Until that happens, the terms enum API will return terms
4683
4719
  from these documents.
4684
4720
 
4685
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-terms-enum.html>`_
4721
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-terms-enum.html>`_
4686
4722
 
4687
4723
  :param index: Comma-separated list of data streams, indices, and index aliases
4688
4724
  to search. Wildcard (*) expressions are supported.
@@ -4781,7 +4817,7 @@ class AsyncElasticsearch(BaseClient):
4781
4817
  Get term vector information. Get information and statistics about terms in the
4782
4818
  fields of a particular document.
4783
4819
 
4784
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-termvectors.html>`_
4820
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-termvectors.html>`_
4785
4821
 
4786
4822
  :param index: Name of the index that contains the document.
4787
4823
  :param id: Unique identifier of the document.
@@ -4924,7 +4960,7 @@ class AsyncElasticsearch(BaseClient):
4924
4960
  Update a document. Updates a document by running a script or passing a partial
4925
4961
  document.
4926
4962
 
4927
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-update.html>`_
4963
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update.html>`_
4928
4964
 
4929
4965
  :param index: The name of the index
4930
4966
  :param id: Document ID
@@ -5090,7 +5126,7 @@ class AsyncElasticsearch(BaseClient):
5090
5126
  is specified, performs an update on every document in the data stream or index
5091
5127
  without modifying the source, which is useful for picking up mapping changes.
5092
5128
 
5093
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-update-by-query.html>`_
5129
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update-by-query.html>`_
5094
5130
 
5095
5131
  :param index: Comma-separated list of data streams, indices, and aliases to search.
5096
5132
  Supports wildcards (`*`). To search all data streams or indices, omit this
@@ -5289,7 +5325,7 @@ class AsyncElasticsearch(BaseClient):
5289
5325
  takes effect immediately but rethrotting that slows down the query takes effect
5290
5326
  after completing the current batch to prevent scroll timeouts.
5291
5327
 
5292
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-update-by-query.html>`_
5328
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update-by-query.html>`_
5293
5329
 
5294
5330
  :param task_id: The ID for the task.
5295
5331
  :param requests_per_second: The throttle for this request in sub-requests per
@@ -42,7 +42,7 @@ class AsyncSearchClient(NamespacedClient):
42
42
  the authenticated user that submitted the original search request; users that
43
43
  have the `cancel_task` cluster privilege.
44
44
 
45
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
45
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
46
46
 
47
47
  :param id: A unique identifier for the async search.
48
48
  """
@@ -90,7 +90,7 @@ class AsyncSearchClient(NamespacedClient):
90
90
  the results of a specific async search is restricted to the user or API key that
91
91
  submitted it.
92
92
 
93
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
93
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
94
94
 
95
95
  :param id: A unique identifier for the async search.
96
96
  :param keep_alive: Specifies how long the async search should be available in
@@ -145,6 +145,7 @@ class AsyncSearchClient(NamespacedClient):
145
145
  error_trace: t.Optional[bool] = None,
146
146
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
147
147
  human: t.Optional[bool] = None,
148
+ keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
148
149
  pretty: t.Optional[bool] = None,
149
150
  ) -> ObjectApiResponse[t.Any]:
150
151
  """
@@ -153,9 +154,12 @@ class AsyncSearchClient(NamespacedClient):
153
154
  security features are enabled, use of this API is restricted to the `monitoring_user`
154
155
  role.
155
156
 
156
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
157
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
157
158
 
158
159
  :param id: A unique identifier for the async search.
160
+ :param keep_alive: Specifies how long the async search needs to be available.
161
+ Ongoing async searches and any saved search results are deleted after this
162
+ period.
159
163
  """
160
164
  if id in SKIP_IN_PATH:
161
165
  raise ValueError("Empty value passed for parameter 'id'")
@@ -168,6 +172,8 @@ class AsyncSearchClient(NamespacedClient):
168
172
  __query["filter_path"] = filter_path
169
173
  if human is not None:
170
174
  __query["human"] = human
175
+ if keep_alive is not None:
176
+ __query["keep_alive"] = keep_alive
171
177
  if pretty is not None:
172
178
  __query["pretty"] = pretty
173
179
  __headers = {"accept": "application/json"}
@@ -258,7 +264,6 @@ class AsyncSearchClient(NamespacedClient):
258
264
  ignore_throttled: t.Optional[bool] = None,
259
265
  ignore_unavailable: t.Optional[bool] = None,
260
266
  indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
261
- keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
262
267
  keep_on_completion: t.Optional[bool] = None,
263
268
  knn: t.Optional[
264
269
  t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -269,7 +274,6 @@ class AsyncSearchClient(NamespacedClient):
269
274
  min_score: t.Optional[float] = None,
270
275
  pit: t.Optional[t.Mapping[str, t.Any]] = None,
271
276
  post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
272
- pre_filter_shard_size: t.Optional[int] = None,
273
277
  preference: t.Optional[str] = None,
274
278
  pretty: t.Optional[bool] = None,
275
279
  profile: t.Optional[bool] = None,
@@ -283,7 +287,6 @@ class AsyncSearchClient(NamespacedClient):
283
287
  routing: t.Optional[str] = None,
284
288
  runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
285
289
  script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
286
- scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
287
290
  search_after: t.Optional[
288
291
  t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
289
292
  ] = None,
@@ -333,7 +336,7 @@ class AsyncSearchClient(NamespacedClient):
333
336
  can be set by changing the `search.max_async_search_response_size` cluster level
334
337
  setting.
335
338
 
336
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
339
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
337
340
 
338
341
  :param index: A comma-separated list of index names to search; use `_all` or
339
342
  empty string to perform the operation on all indices
@@ -376,9 +379,6 @@ class AsyncSearchClient(NamespacedClient):
376
379
  :param ignore_unavailable: Whether specified concrete indices should be ignored
377
380
  when unavailable (missing or closed)
378
381
  :param indices_boost: Boosts the _score of documents from specified indices.
379
- :param keep_alive: Specifies how long the async search needs to be available.
380
- Ongoing async searches and any saved search results are deleted after this
381
- period.
382
382
  :param keep_on_completion: If `true`, results are stored for later retrieval
383
383
  when the search completes within the `wait_for_completion_timeout`.
384
384
  :param knn: Defines the approximate kNN search to run.
@@ -394,10 +394,6 @@ class AsyncSearchClient(NamespacedClient):
394
394
  :param pit: Limits the search to a point in time (PIT). If you provide a PIT,
395
395
  you cannot specify an <index> in the request path.
396
396
  :param post_filter:
397
- :param pre_filter_shard_size: The default value cannot be changed, which enforces
398
- the execution of a pre-filter roundtrip to retrieve statistics from each
399
- shard so that the ones that surely don’t hold any document matching the query
400
- get skipped.
401
397
  :param preference: Specify the node or shard the operation should be performed
402
398
  on (default: random)
403
399
  :param profile:
@@ -406,13 +402,13 @@ class AsyncSearchClient(NamespacedClient):
406
402
  :param request_cache: Specify if request cache should be used for this request
407
403
  or not, defaults to true
408
404
  :param rescore:
409
- :param rest_total_hits_as_int:
405
+ :param rest_total_hits_as_int: Indicates whether hits.total should be rendered
406
+ as an integer or an object in the rest search response
410
407
  :param routing: A comma-separated list of specific routing values
411
408
  :param runtime_mappings: Defines one or more runtime fields in the search request.
412
409
  These fields take precedence over mapped fields with the same name.
413
410
  :param script_fields: Retrieve a script evaluation (based on different fields)
414
411
  for each hit.
415
- :param scroll:
416
412
  :param search_after:
417
413
  :param search_type: Search operation type
418
414
  :param seq_no_primary_term: If true, returns sequence number and primary term
@@ -509,8 +505,6 @@ class AsyncSearchClient(NamespacedClient):
509
505
  __query["ignore_throttled"] = ignore_throttled
510
506
  if ignore_unavailable is not None:
511
507
  __query["ignore_unavailable"] = ignore_unavailable
512
- if keep_alive is not None:
513
- __query["keep_alive"] = keep_alive
514
508
  if keep_on_completion is not None:
515
509
  __query["keep_on_completion"] = keep_on_completion
516
510
  if lenient is not None:
@@ -519,8 +513,6 @@ class AsyncSearchClient(NamespacedClient):
519
513
  __query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
520
514
  if min_compatible_shard_node is not None:
521
515
  __query["min_compatible_shard_node"] = min_compatible_shard_node
522
- if pre_filter_shard_size is not None:
523
- __query["pre_filter_shard_size"] = pre_filter_shard_size
524
516
  if preference is not None:
525
517
  __query["preference"] = preference
526
518
  if pretty is not None:
@@ -533,8 +525,6 @@ class AsyncSearchClient(NamespacedClient):
533
525
  __query["rest_total_hits_as_int"] = rest_total_hits_as_int
534
526
  if routing is not None:
535
527
  __query["routing"] = routing
536
- if scroll is not None:
537
- __query["scroll"] = scroll
538
528
  if search_type is not None:
539
529
  __query["search_type"] = search_type
540
530
  if source_excludes is not None: