Skip to content

Commit eb78936

Browse files
Auto-generated API code
1 parent 23bb050 commit eb78936

File tree

11 files changed

+95
-63
lines changed

11 files changed

+95
-63
lines changed

elasticsearch/_async/client/cat.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3301,10 +3301,20 @@ async def segments(
33013301
self,
33023302
*,
33033303
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3304+
allow_closed: t.Optional[bool] = None,
3305+
allow_no_indices: t.Optional[bool] = None,
33043306
bytes: t.Optional[
33053307
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
33063308
] = None,
33073309
error_trace: t.Optional[bool] = None,
3310+
expand_wildcards: t.Optional[
3311+
t.Union[
3312+
t.Sequence[
3313+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3314+
],
3315+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3316+
]
3317+
] = None,
33083318
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
33093319
format: t.Optional[str] = None,
33103320
h: t.Optional[
@@ -3355,6 +3365,8 @@ async def segments(
33553365
] = None,
33563366
help: t.Optional[bool] = None,
33573367
human: t.Optional[bool] = None,
3368+
ignore_throttled: t.Optional[bool] = None,
3369+
ignore_unavailable: t.Optional[bool] = None,
33583370
local: t.Optional[bool] = None,
33593371
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
33603372
pretty: t.Optional[bool] = None,
@@ -3378,6 +3390,14 @@ async def segments(
33783390
:param index: A comma-separated list of data streams, indices, and aliases used
33793391
to limit the request. Supports wildcards (`*`). To target all data streams
33803392
and indices, omit this parameter or use `*` or `_all`.
3393+
:param allow_closed: If true, allow closed indices to be returned in the response
3394+
otherwise if false, keep the legacy behaviour of throwing an exception if
3395+
index pattern matches closed indices
3396+
:param allow_no_indices: If false, the request returns an error if any wildcard
3397+
expression, index alias, or _all value targets only missing or closed indices.
3398+
This behavior applies even if the request targets other open indices. For
3399+
example, a request targeting foo*,bar* returns an error if an index starts
3400+
with foo but no index starts with bar.
33813401
:param bytes: Sets the units for columns that contain a byte-size value. Note
33823402
that byte-size value units work in terms of powers of 1024. For instance
33833403
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
@@ -3386,12 +3406,20 @@ async def segments(
33863406
least `1.0`. If given, byte-size values are rendered as an integer with no
33873407
suffix, representing the value of the column in the chosen unit. Values that
33883408
are not an exact multiple of the chosen unit are rounded down.
3409+
:param expand_wildcards: Type of index that wildcard expressions can match. If
3410+
the request can target data streams, this argument determines whether wildcard
3411+
expressions match hidden data streams. Supports comma-separated values, such
3412+
as open,hidden.
33893413
:param format: Specifies the format to return the columnar data in, can be set
33903414
to `text`, `json`, `cbor`, `yaml`, or `smile`.
33913415
:param h: A comma-separated list of columns names to display. It supports simple
33923416
wildcards.
33933417
:param help: When set to `true` will output available columns. This option can't
33943418
be combined with any other query string option.
3419+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
3420+
when frozen.
3421+
:param ignore_unavailable: If true, missing or closed indices are not included
3422+
in the response.
33953423
:param local: If `true`, the request computes the list of selected nodes from
33963424
the local cluster state. If `false` the list of selected nodes are computed
33973425
from the cluster state of the master node. In both cases the coordinating
@@ -3416,10 +3444,16 @@ async def segments(
34163444
__path_parts = {}
34173445
__path = "/_cat/segments"
34183446
__query: t.Dict[str, t.Any] = {}
3447+
if allow_closed is not None:
3448+
__query["allow_closed"] = allow_closed
3449+
if allow_no_indices is not None:
3450+
__query["allow_no_indices"] = allow_no_indices
34193451
if bytes is not None:
34203452
__query["bytes"] = bytes
34213453
if error_trace is not None:
34223454
__query["error_trace"] = error_trace
3455+
if expand_wildcards is not None:
3456+
__query["expand_wildcards"] = expand_wildcards
34233457
if filter_path is not None:
34243458
__query["filter_path"] = filter_path
34253459
if format is not None:
@@ -3430,6 +3464,10 @@ async def segments(
34303464
__query["help"] = help
34313465
if human is not None:
34323466
__query["human"] = human
3467+
if ignore_throttled is not None:
3468+
__query["ignore_throttled"] = ignore_throttled
3469+
if ignore_unavailable is not None:
3470+
__query["ignore_unavailable"] = ignore_unavailable
34333471
if local is not None:
34343472
__query["local"] = local
34353473
if master_timeout is not None:

elasticsearch/_async/client/indices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3565,7 +3565,7 @@ async def put_data_lifecycle(
35653565
*,
35663566
name: t.Union[str, t.Sequence[str]],
35673567
data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3568-
downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3568+
downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
35693569
enabled: t.Optional[bool] = None,
35703570
error_trace: t.Optional[bool] = None,
35713571
expand_wildcards: t.Optional[

elasticsearch/_async/client/security.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,8 @@ async def query_role(
37113711
:param size: The number of hits to return. It must not be negative. By default,
37123712
you cannot page through more than 10,000 hits using the `from` and `size`
37133713
parameters. To page through more hits, use the `search_after` parameter.
3714-
:param sort: The sort definition. You can sort on `username`, `roles`, or `enabled`.
3714+
:param sort: The sort definition. You can sort on `name`, `description`, `metadata`,
3715+
`applications.application`, `applications.privileges`, and `applications.resources`.
37153716
In addition, sort can also be applied to the `_doc` field to sort by index
37163717
order.
37173718
"""

elasticsearch/_sync/client/cat.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3301,10 +3301,20 @@ def segments(
33013301
self,
33023302
*,
33033303
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3304+
allow_closed: t.Optional[bool] = None,
3305+
allow_no_indices: t.Optional[bool] = None,
33043306
bytes: t.Optional[
33053307
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
33063308
] = None,
33073309
error_trace: t.Optional[bool] = None,
3310+
expand_wildcards: t.Optional[
3311+
t.Union[
3312+
t.Sequence[
3313+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3314+
],
3315+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3316+
]
3317+
] = None,
33083318
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
33093319
format: t.Optional[str] = None,
33103320
h: t.Optional[
@@ -3355,6 +3365,8 @@ def segments(
33553365
] = None,
33563366
help: t.Optional[bool] = None,
33573367
human: t.Optional[bool] = None,
3368+
ignore_throttled: t.Optional[bool] = None,
3369+
ignore_unavailable: t.Optional[bool] = None,
33583370
local: t.Optional[bool] = None,
33593371
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
33603372
pretty: t.Optional[bool] = None,
@@ -3378,6 +3390,14 @@ def segments(
33783390
:param index: A comma-separated list of data streams, indices, and aliases used
33793391
to limit the request. Supports wildcards (`*`). To target all data streams
33803392
and indices, omit this parameter or use `*` or `_all`.
3393+
:param allow_closed: If true, allow closed indices to be returned in the response
3394+
otherwise if false, keep the legacy behaviour of throwing an exception if
3395+
index pattern matches closed indices
3396+
:param allow_no_indices: If false, the request returns an error if any wildcard
3397+
expression, index alias, or _all value targets only missing or closed indices.
3398+
This behavior applies even if the request targets other open indices. For
3399+
example, a request targeting foo*,bar* returns an error if an index starts
3400+
with foo but no index starts with bar.
33813401
:param bytes: Sets the units for columns that contain a byte-size value. Note
33823402
that byte-size value units work in terms of powers of 1024. For instance
33833403
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
@@ -3386,12 +3406,20 @@ def segments(
33863406
least `1.0`. If given, byte-size values are rendered as an integer with no
33873407
suffix, representing the value of the column in the chosen unit. Values that
33883408
are not an exact multiple of the chosen unit are rounded down.
3409+
:param expand_wildcards: Type of index that wildcard expressions can match. If
3410+
the request can target data streams, this argument determines whether wildcard
3411+
expressions match hidden data streams. Supports comma-separated values, such
3412+
as open,hidden.
33893413
:param format: Specifies the format to return the columnar data in, can be set
33903414
to `text`, `json`, `cbor`, `yaml`, or `smile`.
33913415
:param h: A comma-separated list of columns names to display. It supports simple
33923416
wildcards.
33933417
:param help: When set to `true` will output available columns. This option can't
33943418
be combined with any other query string option.
3419+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
3420+
when frozen.
3421+
:param ignore_unavailable: If true, missing or closed indices are not included
3422+
in the response.
33953423
:param local: If `true`, the request computes the list of selected nodes from
33963424
the local cluster state. If `false` the list of selected nodes are computed
33973425
from the cluster state of the master node. In both cases the coordinating
@@ -3416,10 +3444,16 @@ def segments(
34163444
__path_parts = {}
34173445
__path = "/_cat/segments"
34183446
__query: t.Dict[str, t.Any] = {}
3447+
if allow_closed is not None:
3448+
__query["allow_closed"] = allow_closed
3449+
if allow_no_indices is not None:
3450+
__query["allow_no_indices"] = allow_no_indices
34193451
if bytes is not None:
34203452
__query["bytes"] = bytes
34213453
if error_trace is not None:
34223454
__query["error_trace"] = error_trace
3455+
if expand_wildcards is not None:
3456+
__query["expand_wildcards"] = expand_wildcards
34233457
if filter_path is not None:
34243458
__query["filter_path"] = filter_path
34253459
if format is not None:
@@ -3430,6 +3464,10 @@ def segments(
34303464
__query["help"] = help
34313465
if human is not None:
34323466
__query["human"] = human
3467+
if ignore_throttled is not None:
3468+
__query["ignore_throttled"] = ignore_throttled
3469+
if ignore_unavailable is not None:
3470+
__query["ignore_unavailable"] = ignore_unavailable
34333471
if local is not None:
34343472
__query["local"] = local
34353473
if master_timeout is not None:

elasticsearch/_sync/client/indices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3565,7 +3565,7 @@ def put_data_lifecycle(
35653565
*,
35663566
name: t.Union[str, t.Sequence[str]],
35673567
data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3568-
downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3568+
downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
35693569
enabled: t.Optional[bool] = None,
35703570
error_trace: t.Optional[bool] = None,
35713571
expand_wildcards: t.Optional[

elasticsearch/_sync/client/security.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,8 @@ def query_role(
37113711
:param size: The number of hits to return. It must not be negative. By default,
37123712
you cannot page through more than 10,000 hits using the `from` and `size`
37133713
parameters. To page through more hits, use the `search_after` parameter.
3714-
:param sort: The sort definition. You can sort on `username`, `roles`, or `enabled`.
3714+
:param sort: The sort definition. You can sort on `name`, `description`, `metadata`,
3715+
`applications.application`, `applications.privileges`, and `applications.resources`.
37153716
In addition, sort can also be applied to the `_doc` field to sort by index
37163717
order.
37173718
"""

elasticsearch/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717

1818
__versionstr__ = "9.1.2"
19-
__es_specification_commit__ = "cc623e3b52dd3dfd85848ee992713d37da020bfb"
19+
__es_specification_commit__ = "882e753d29815f0983faf2e3e39466e2aa5d9121"

elasticsearch/dsl/aggs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2680,7 +2680,7 @@ def __init__(
26802680
self,
26812681
*,
26822682
keyed: Union[bool, "DefaultType"] = DEFAULT,
2683-
percents: Union[Sequence[float], "DefaultType"] = DEFAULT,
2683+
percents: Union[float, Sequence[float], "DefaultType"] = DEFAULT,
26842684
hdr: Union["types.HdrMethod", Dict[str, Any], "DefaultType"] = DEFAULT,
26852685
tdigest: Union["types.TDigest", Dict[str, Any], "DefaultType"] = DEFAULT,
26862686
format: Union[str, "DefaultType"] = DEFAULT,

elasticsearch/dsl/field.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3866,9 +3866,6 @@ class SemanticText(Field):
38663866
by using the Update mapping API. Use the Create inference API to
38673867
create the endpoint. If not specified, the inference endpoint
38683868
defined by inference_id will be used at both index and query time.
3869-
:arg index_options: Settings for index_options that override any
3870-
defaults used by semantic_text, for example specific quantization
3871-
settings.
38723869
:arg chunking_settings: Settings for chunking text into smaller
38733870
passages. If specified, these will override the chunking settings
38743871
sent in the inference endpoint associated with inference_id. If
@@ -3888,11 +3885,8 @@ def __init__(
38883885
meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
38893886
inference_id: Union[str, "DefaultType"] = DEFAULT,
38903887
search_inference_id: Union[str, "DefaultType"] = DEFAULT,
3891-
index_options: Union[
3892-
"types.SemanticTextIndexOptions", Dict[str, Any], "DefaultType"
3893-
] = DEFAULT,
38943888
chunking_settings: Union[
3895-
"types.ChunkingSettings", None, Dict[str, Any], "DefaultType"
3889+
"types.ChunkingSettings", Dict[str, Any], "DefaultType"
38963890
] = DEFAULT,
38973891
fields: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
38983892
**kwargs: Any,
@@ -3903,8 +3897,6 @@ def __init__(
39033897
kwargs["inference_id"] = inference_id
39043898
if search_inference_id is not DEFAULT:
39053899
kwargs["search_inference_id"] = search_inference_id
3906-
if index_options is not DEFAULT:
3907-
kwargs["index_options"] = index_options
39083900
if chunking_settings is not DEFAULT:
39093901
kwargs["chunking_settings"] = chunking_settings
39103902
if fields is not DEFAULT:

elasticsearch/dsl/query.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,6 @@ class Knn(Query):
10791079
a query_vector_builder or query_vector, but not both.
10801080
:arg num_candidates: The number of nearest neighbor candidates to
10811081
consider per shard
1082-
:arg visit_percentage: The percentage of vectors to explore per shard
1083-
while doing knn search with bbq_disk
10841082
:arg k: The final number of nearest neighbors to return as top hits
10851083
:arg filter: Filters for the kNN search query
10861084
:arg similarity: The minimum similarity for a vector to be considered
@@ -1109,7 +1107,6 @@ def __init__(
11091107
"types.QueryVectorBuilder", Dict[str, Any], "DefaultType"
11101108
] = DEFAULT,
11111109
num_candidates: Union[int, "DefaultType"] = DEFAULT,
1112-
visit_percentage: Union[float, "DefaultType"] = DEFAULT,
11131110
k: Union[int, "DefaultType"] = DEFAULT,
11141111
filter: Union[Query, Sequence[Query], "DefaultType"] = DEFAULT,
11151112
similarity: Union[float, "DefaultType"] = DEFAULT,
@@ -1125,7 +1122,6 @@ def __init__(
11251122
query_vector=query_vector,
11261123
query_vector_builder=query_vector_builder,
11271124
num_candidates=num_candidates,
1128-
visit_percentage=visit_percentage,
11291125
k=k,
11301126
filter=filter,
11311127
similarity=similarity,
@@ -1437,7 +1433,7 @@ def __init__(
14371433
] = DEFAULT,
14381434
version: Union[int, "DefaultType"] = DEFAULT,
14391435
version_type: Union[
1440-
Literal["internal", "external", "external_gte"], "DefaultType"
1436+
Literal["internal", "external", "external_gte", "force"], "DefaultType"
14411437
] = DEFAULT,
14421438
boost: Union[float, "DefaultType"] = DEFAULT,
14431439
_name: Union[str, "DefaultType"] = DEFAULT,

0 commit comments

Comments
 (0)