Skip to content

Commit 0bea932

Browse files
Auto-generated API code (#2956)
1 parent b32e38e commit 0bea932

31 files changed

+1726
-476
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,7 @@ async def create(
11211121
error_trace: t.Optional[bool] = None,
11221122
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
11231123
human: t.Optional[bool] = None,
1124-
if_primary_term: t.Optional[int] = None,
1125-
if_seq_no: t.Optional[int] = None,
11261124
include_source_on_error: t.Optional[bool] = None,
1127-
op_type: t.Optional[t.Union[str, t.Literal["create", "index"]]] = None,
11281125
pipeline: t.Optional[str] = None,
11291126
pretty: t.Optional[bool] = None,
11301127
refresh: t.Optional[
@@ -1209,18 +1206,8 @@ async def create(
12091206
:param id: A unique identifier for the document. To automatically generate a
12101207
document ID, use the `POST /<target>/_doc/` request format.
12111208
:param document:
1212-
:param if_primary_term: Only perform the operation if the document has this primary
1213-
term.
1214-
:param if_seq_no: Only perform the operation if the document has this sequence
1215-
number.
12161209
:param include_source_on_error: True or false if to include the document source
12171210
in the error message in case of parsing errors.
1218-
:param op_type: Set to `create` to only index the document if it does not already
1219-
exist (put if absent). If a document with the specified `_id` already exists,
1220-
the indexing operation will fail. The behavior is the same as using the `<index>/_create`
1221-
endpoint. If a document ID is specified, this paramater defaults to `index`.
1222-
Otherwise, it defaults to `create`. If the request targets a data stream,
1223-
an `op_type` of `create` is required.
12241211
:param pipeline: The ID of the pipeline to use to preprocess incoming documents.
12251212
If the index has a default ingest pipeline specified, setting the value to
12261213
`_none` turns off the default ingest pipeline for this request. If a final
@@ -1272,14 +1259,8 @@ async def create(
12721259
__query["filter_path"] = filter_path
12731260
if human is not None:
12741261
__query["human"] = human
1275-
if if_primary_term is not None:
1276-
__query["if_primary_term"] = if_primary_term
1277-
if if_seq_no is not None:
1278-
__query["if_seq_no"] = if_seq_no
12791262
if include_source_on_error is not None:
12801263
__query["include_source_on_error"] = include_source_on_error
1281-
if op_type is not None:
1282-
__query["op_type"] = op_type
12831264
if pipeline is not None:
12841265
__query["pipeline"] = pipeline
12851266
if pretty is not None:
@@ -2652,7 +2633,6 @@ async def get_source(
26522633
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
26532634
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
26542635
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2655-
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
26562636
version: t.Optional[int] = None,
26572637
version_type: t.Optional[
26582638
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
@@ -2689,8 +2669,6 @@ async def get_source(
26892669
the response.
26902670
:param source_includes: A comma-separated list of source fields to include in
26912671
the response.
2692-
:param stored_fields: A comma-separated list of stored fields to return as part
2693-
of a hit.
26942672
:param version: The version number for concurrency control. It must match the
26952673
current version of the document for the request to succeed.
26962674
:param version_type: The version type.
@@ -2724,8 +2702,6 @@ async def get_source(
27242702
__query["_source_excludes"] = source_excludes
27252703
if source_includes is not None:
27262704
__query["_source_includes"] = source_includes
2727-
if stored_fields is not None:
2728-
__query["stored_fields"] = stored_fields
27292705
if version is not None:
27302706
__query["version"] = version
27312707
if version_type is not None:
@@ -2834,6 +2810,7 @@ async def index(
28342810
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
28352811
] = None,
28362812
require_alias: t.Optional[bool] = None,
2813+
require_data_stream: t.Optional[bool] = None,
28372814
routing: t.Optional[str] = None,
28382815
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
28392816
version: t.Optional[int] = None,
@@ -2969,6 +2946,8 @@ async def index(
29692946
this operation visible to search. If `wait_for`, it waits for a refresh to
29702947
make this operation visible to search. If `false`, it does nothing with refreshes.
29712948
:param require_alias: If `true`, the destination must be an index alias.
2949+
:param require_data_stream: If `true`, the request's actions must target a data
2950+
stream (existing or to be created).
29722951
:param routing: A custom value that is used to route operations to a specific
29732952
shard.
29742953
:param timeout: The period the request waits for the following operations: automatic
@@ -3030,6 +3009,8 @@ async def index(
30303009
__query["refresh"] = refresh
30313010
if require_alias is not None:
30323011
__query["require_alias"] = require_alias
3012+
if require_data_stream is not None:
3013+
__query["require_data_stream"] = require_data_stream
30333014
if routing is not None:
30343015
__query["routing"] = routing
30353016
if timeout is not None:
@@ -3065,7 +3046,8 @@ async def info(
30653046
.. raw:: html
30663047
30673048
<p>Get cluster info.
3068-
Get basic build, version, and cluster information.</p>
3049+
Get basic build, version, and cluster information.
3050+
::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.</p>
30693051
30703052
30713053
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rest-api-root.html>`_
@@ -3798,8 +3780,7 @@ async def open_point_in_time(
37983780
:param expand_wildcards: The type of index that wildcard patterns can match.
37993781
If the request can target data streams, this argument determines whether
38003782
wildcard expressions match hidden data streams. It supports comma-separated
3801-
values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`,
3802-
`hidden`, `none`.
3783+
values, such as `open,hidden`.
38033784
:param ignore_unavailable: If `false`, the request returns an error if it targets
38043785
a missing or closed index.
38053786
:param index_filter: Filter indices if the provided query rewrites to `match_none`
@@ -5695,7 +5676,7 @@ async def search_shards(
56955676
:param expand_wildcards: Type of index that wildcard patterns can match. If the
56965677
request can target data streams, this argument determines whether wildcard
56975678
expressions match hidden data streams. Supports comma-separated values, such
5698-
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
5679+
as `open,hidden`.
56995680
:param ignore_unavailable: If `false`, the request returns an error if it targets
57005681
a missing or closed index.
57015682
:param local: If `true`, the request retrieves information from the local node
@@ -5807,8 +5788,7 @@ async def search_template(
58075788
:param expand_wildcards: The type of index that wildcard patterns can match.
58085789
If the request can target data streams, this argument determines whether
58095790
wildcard expressions match hidden data streams. Supports comma-separated
5810-
values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`,
5811-
`hidden`, `none`.
5791+
values, such as `open,hidden`.
58125792
:param explain: If `true`, returns detailed information about score calculation
58135793
as part of each hit. If you specify both this and the `explain` query parameter,
58145794
the API uses only the query parameter.
@@ -6519,8 +6499,7 @@ async def update_by_query(
65196499
:param expand_wildcards: The type of index that wildcard patterns can match.
65206500
If the request can target data streams, this argument determines whether
65216501
wildcard expressions match hidden data streams. It supports comma-separated
6522-
values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`,
6523-
`hidden`, `none`.
6502+
values, such as `open,hidden`.
65246503
:param from_: Skips the specified number of documents.
65256504
:param ignore_unavailable: If `false`, the request returns an error if it targets
65266505
a missing or closed index.

elasticsearch/_async/client/async_search.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ async def submit(
281281
] = None,
282282
lenient: t.Optional[bool] = None,
283283
max_concurrent_shard_requests: t.Optional[int] = None,
284-
min_compatible_shard_node: t.Optional[str] = None,
285284
min_score: t.Optional[float] = None,
286285
pit: t.Optional[t.Mapping[str, t.Any]] = None,
287286
post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -401,7 +400,6 @@ async def submit(
401400
per node this search executes concurrently. This value should be used to
402401
limit the impact of the search on the cluster in order to limit the number
403402
of concurrent shard requests
404-
:param min_compatible_shard_node:
405403
:param min_score: Minimum _score for matching documents. Documents with a lower
406404
_score are not included in the search results.
407405
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
@@ -526,8 +524,6 @@ async def submit(
526524
__query["lenient"] = lenient
527525
if max_concurrent_shard_requests is not None:
528526
__query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
529-
if min_compatible_shard_node is not None:
530-
__query["min_compatible_shard_node"] = min_compatible_shard_node
531527
if preference is not None:
532528
__query["preference"] = preference
533529
if pretty is not None:

0 commit comments

Comments
 (0)