@@ -1121,10 +1121,7 @@ async def create(
1121
1121
error_trace : t .Optional [bool ] = None ,
1122
1122
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
1123
1123
human : t .Optional [bool ] = None ,
1124
- if_primary_term : t .Optional [int ] = None ,
1125
- if_seq_no : t .Optional [int ] = None ,
1126
1124
include_source_on_error : t .Optional [bool ] = None ,
1127
- op_type : t .Optional [t .Union [str , t .Literal ["create" , "index" ]]] = None ,
1128
1125
pipeline : t .Optional [str ] = None ,
1129
1126
pretty : t .Optional [bool ] = None ,
1130
1127
refresh : t .Optional [
@@ -1209,18 +1206,8 @@ async def create(
1209
1206
:param id: A unique identifier for the document. To automatically generate a
1210
1207
document ID, use the `POST /<target>/_doc/` request format.
1211
1208
: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.
1216
1209
:param include_source_on_error: True or false if to include the document source
1217
1210
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.
1224
1211
:param pipeline: The ID of the pipeline to use to preprocess incoming documents.
1225
1212
If the index has a default ingest pipeline specified, setting the value to
1226
1213
`_none` turns off the default ingest pipeline for this request. If a final
@@ -1272,14 +1259,8 @@ async def create(
1272
1259
__query ["filter_path" ] = filter_path
1273
1260
if human is not None :
1274
1261
__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
1279
1262
if include_source_on_error is not None :
1280
1263
__query ["include_source_on_error" ] = include_source_on_error
1281
- if op_type is not None :
1282
- __query ["op_type" ] = op_type
1283
1264
if pipeline is not None :
1284
1265
__query ["pipeline" ] = pipeline
1285
1266
if pretty is not None :
@@ -2652,7 +2633,6 @@ async def get_source(
2652
2633
source : t .Optional [t .Union [bool , t .Union [str , t .Sequence [str ]]]] = None ,
2653
2634
source_excludes : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
2654
2635
source_includes : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
2655
- stored_fields : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
2656
2636
version : t .Optional [int ] = None ,
2657
2637
version_type : t .Optional [
2658
2638
t .Union [str , t .Literal ["external" , "external_gte" , "force" , "internal" ]]
@@ -2689,8 +2669,6 @@ async def get_source(
2689
2669
the response.
2690
2670
:param source_includes: A comma-separated list of source fields to include in
2691
2671
the response.
2692
- :param stored_fields: A comma-separated list of stored fields to return as part
2693
- of a hit.
2694
2672
:param version: The version number for concurrency control. It must match the
2695
2673
current version of the document for the request to succeed.
2696
2674
:param version_type: The version type.
@@ -2724,8 +2702,6 @@ async def get_source(
2724
2702
__query ["_source_excludes" ] = source_excludes
2725
2703
if source_includes is not None :
2726
2704
__query ["_source_includes" ] = source_includes
2727
- if stored_fields is not None :
2728
- __query ["stored_fields" ] = stored_fields
2729
2705
if version is not None :
2730
2706
__query ["version" ] = version
2731
2707
if version_type is not None :
@@ -2834,6 +2810,7 @@ async def index(
2834
2810
t .Union [bool , str , t .Literal ["false" , "true" , "wait_for" ]]
2835
2811
] = None ,
2836
2812
require_alias : t .Optional [bool ] = None ,
2813
+ require_data_stream : t .Optional [bool ] = None ,
2837
2814
routing : t .Optional [str ] = None ,
2838
2815
timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
2839
2816
version : t .Optional [int ] = None ,
@@ -2969,6 +2946,8 @@ async def index(
2969
2946
this operation visible to search. If `wait_for`, it waits for a refresh to
2970
2947
make this operation visible to search. If `false`, it does nothing with refreshes.
2971
2948
: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).
2972
2951
:param routing: A custom value that is used to route operations to a specific
2973
2952
shard.
2974
2953
:param timeout: The period the request waits for the following operations: automatic
@@ -3030,6 +3009,8 @@ async def index(
3030
3009
__query ["refresh" ] = refresh
3031
3010
if require_alias is not None :
3032
3011
__query ["require_alias" ] = require_alias
3012
+ if require_data_stream is not None :
3013
+ __query ["require_data_stream" ] = require_data_stream
3033
3014
if routing is not None :
3034
3015
__query ["routing" ] = routing
3035
3016
if timeout is not None :
@@ -3065,7 +3046,8 @@ async def info(
3065
3046
.. raw:: html
3066
3047
3067
3048
<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>
3069
3051
3070
3052
3071
3053
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rest-api-root.html>`_
@@ -3798,8 +3780,7 @@ async def open_point_in_time(
3798
3780
:param expand_wildcards: The type of index that wildcard patterns can match.
3799
3781
If the request can target data streams, this argument determines whether
3800
3782
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`.
3803
3784
:param ignore_unavailable: If `false`, the request returns an error if it targets
3804
3785
a missing or closed index.
3805
3786
:param index_filter: Filter indices if the provided query rewrites to `match_none`
@@ -5695,7 +5676,7 @@ async def search_shards(
5695
5676
:param expand_wildcards: Type of index that wildcard patterns can match. If the
5696
5677
request can target data streams, this argument determines whether wildcard
5697
5678
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`.
5699
5680
:param ignore_unavailable: If `false`, the request returns an error if it targets
5700
5681
a missing or closed index.
5701
5682
:param local: If `true`, the request retrieves information from the local node
@@ -5807,8 +5788,7 @@ async def search_template(
5807
5788
:param expand_wildcards: The type of index that wildcard patterns can match.
5808
5789
If the request can target data streams, this argument determines whether
5809
5790
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`.
5812
5792
:param explain: If `true`, returns detailed information about score calculation
5813
5793
as part of each hit. If you specify both this and the `explain` query parameter,
5814
5794
the API uses only the query parameter.
@@ -6519,8 +6499,7 @@ async def update_by_query(
6519
6499
:param expand_wildcards: The type of index that wildcard patterns can match.
6520
6500
If the request can target data streams, this argument determines whether
6521
6501
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`.
6524
6503
:param from_: Skips the specified number of documents.
6525
6504
:param ignore_unavailable: If `false`, the request returns an error if it targets
6526
6505
a missing or closed index.
0 commit comments