diff --git a/elasticsearch/_async/client/__init__.py b/elasticsearch/_async/client/__init__.py
index e4fee64cc..9bc8c88c0 100644
--- a/elasticsearch/_async/client/__init__.py
+++ b/elasticsearch/_async/client/__init__.py
@@ -889,6 +889,7 @@ async def count(
min_score: t.Optional[float] = None,
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
q: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
routing: t.Optional[str] = None,
@@ -943,6 +944,10 @@ async def count(
in the result.
:param preference: The node or shard the operation should be performed on. By
default, it is random.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param q: The query in Lucene query string syntax. This parameter cannot be used
with a request body.
:param query: Defines the search query using Query DSL. A request body query
@@ -995,6 +1000,8 @@ async def count(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if q is not None:
__query["q"] = q
if routing is not None:
@@ -2133,6 +2140,7 @@ async def field_caps(
include_unmapped: t.Optional[bool] = None,
index_filter: t.Optional[t.Mapping[str, t.Any]] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
types: t.Optional[t.Sequence[str]] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
@@ -2176,6 +2184,11 @@ async def field_caps(
deleted documents) are outside of the provided range. However, not all queries
can rewrite to `match_none` so this API may return an index even if the provided
filter matches no document.
+ :param project_routing: Specifies a subset of projects to target for the field-caps
+ query using project metadata tags in a subset of Lucene query syntax. Allowed
+ Lucene queries: the _alias tag and a single value (possibly wildcarded).
+ Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
+ only.
:param runtime_mappings: Define ad-hoc runtime fields in the request similar
to the way it is done in search requests. These fields exist only as part
of the query and take precedence over fields defined with the same name in
@@ -2213,6 +2226,8 @@ async def field_caps(
__query["include_unmapped"] = include_unmapped
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if types is not None:
__query["types"] = types
if not __body:
@@ -3151,6 +3166,7 @@ async def msearch(
max_concurrent_shard_requests: t.Optional[int] = None,
pre_filter_shard_size: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
routing: t.Optional[str] = None,
search_type: t.Optional[
@@ -3212,6 +3228,10 @@ async def msearch(
roundtrip can limit the number of shards significantly if for instance a
shard can not match any documents based on its rewrite method i.e., if date
filters are mandatory to match but the shard bounds and the query are disjoint.
+ :param project_routing: Specifies a subset of projects to target for a search
+ using project metadata tags in a subset Lucene syntax. Allowed Lucene queries:
+ the _alias tag and a single value (possible wildcarded). Examples: _alias:my-project
+ _alias:_origin _alias:*pr* Supported in serverless only.
:param rest_total_hits_as_int: If true, hits.total are returned as an integer
in the response. Defaults to false, which returns an object.
:param routing: Custom routing value used to route search operations to a specific
@@ -3261,6 +3281,8 @@ async def msearch(
__query["pre_filter_shard_size"] = pre_filter_shard_size
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if rest_total_hits_as_int is not None:
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
if routing is not None:
@@ -3299,6 +3321,7 @@ async def msearch_template(
human: t.Optional[bool] = None,
max_concurrent_searches: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
search_type: t.Optional[
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
@@ -3332,6 +3355,10 @@ async def msearch_template(
for cross-cluster search requests.
:param max_concurrent_searches: The maximum number of concurrent searches the
API can run.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param rest_total_hits_as_int: If `true`, the response returns `hits.total` as
an integer. If `false`, it returns `hits.total` as an object.
:param search_type: The type of the search operation.
@@ -3364,6 +3391,8 @@ async def msearch_template(
__query["max_concurrent_searches"] = max_concurrent_searches
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if rest_total_hits_as_int is not None:
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
if search_type is not None:
@@ -3534,6 +3563,7 @@ async def open_point_in_time(
max_concurrent_shard_requests: t.Optional[int] = None,
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
routing: t.Optional[str] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
@@ -3590,6 +3620,11 @@ async def open_point_in_time(
that each sub-search request executes per node.
:param preference: The node or shard the operation should be performed on. By
default, it is random.
+ :param project_routing: Specifies a subset of projects to target for the PIT
+ request using project metadata tags in a subset of Lucene query syntax. Allowed
+ Lucene queries: the _alias tag and a single value (possibly wildcarded).
+ Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
+ only.
:param routing: A custom value that is used to route operations to a specific
shard.
"""
@@ -3621,6 +3656,8 @@ async def open_point_in_time(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if routing is not None:
__query["routing"] = routing
if not __body:
@@ -4377,6 +4414,7 @@ async def search(
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
q: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
rank: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -4560,6 +4598,10 @@ async def search(
:param profile: Set to `true` to return detailed timing information about the
execution of individual components in a search request. NOTE: This is a debugging
tool and adds significant overhead to search execution.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param q: A query in the Lucene query string syntax. Query parameter searches
do not support the full Elasticsearch Query DSL but are handy for testing.
IMPORTANT: This parameter overrides the query parameter in the request body.
@@ -4714,6 +4756,8 @@ async def search(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if q is not None:
__query["q"] = q
if request_cache is not None:
@@ -4868,6 +4912,7 @@ async def search_mvt(
] = None,
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
size: t.Optional[int] = None,
@@ -5185,6 +5230,10 @@ async def search_mvt(
In the aggs layer, each feature represents a `geotile_grid` cell. If `grid,
each feature is a polygon of the cells bounding box. If `point`, each feature
is a Point that is the centroid of the cell.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param query: The query DSL used to filter documents for the search.
:param runtime_mappings: Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
@@ -5248,6 +5297,8 @@ async def search_mvt(
__query["human"] = human
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if not __body:
if aggs is not None:
__body["aggs"] = aggs
@@ -5421,6 +5472,7 @@ async def search_template(
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
routing: t.Optional[str] = None,
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
@@ -5466,6 +5518,10 @@ async def search_template(
:param preference: The node or shard the operation should be performed on. It
is random by default.
:param profile: If `true`, the query execution is profiled.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param rest_total_hits_as_int: If `true`, `hits.total` is rendered as an integer
in the response. If `false`, it is rendered as an object.
:param routing: A custom value used to route operations to a specific shard.
@@ -5507,6 +5563,8 @@ async def search_template(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if rest_total_hits_as_int is not None:
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
if routing is not None:
diff --git a/elasticsearch/_async/client/async_search.py b/elasticsearch/_async/client/async_search.py
index 4d1c32974..5ebe24cd0 100644
--- a/elasticsearch/_async/client/async_search.py
+++ b/elasticsearch/_async/client/async_search.py
@@ -287,6 +287,7 @@ async def submit(
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
q: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
request_cache: t.Optional[bool] = None,
@@ -408,6 +409,10 @@ async def submit(
:param preference: Specify the node or shard the operation should be performed
on (default: random)
:param profile:
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param q: Query in the Lucene query string syntax
:param query: Defines the search definition using the Query DSL.
:param request_cache: Specify if request cache should be used for this request
@@ -528,6 +533,8 @@ async def submit(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if q is not None:
__query["q"] = q
if request_cache is not None:
diff --git a/elasticsearch/_async/client/cat.py b/elasticsearch/_async/client/cat.py
index 84f946f5c..64ba5a605 100644
--- a/elasticsearch/_async/client/cat.py
+++ b/elasticsearch/_async/client/cat.py
@@ -36,6 +36,9 @@ async def aliases(
self,
*,
name: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
expand_wildcards: t.Optional[
t.Union[
@@ -80,6 +83,9 @@ async def aliases(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -95,6 +101,14 @@ async def aliases(
:param name: A comma-separated list of aliases to retrieve. Supports wildcards
(`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param expand_wildcards: The type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether
wildcard expressions match hidden data streams. It supports comma-separated
@@ -112,6 +126,12 @@ async def aliases(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -122,6 +142,8 @@ async def aliases(
__path_parts = {}
__path = "/_cat/aliases"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if expand_wildcards is not None:
@@ -142,6 +164,8 @@ async def aliases(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -213,6 +237,9 @@ async def allocation(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -227,7 +254,14 @@ async def allocation(
:param node_id: A comma-separated list of node identifiers or names used to limit
the returned information.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -242,6 +276,12 @@ async def allocation(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -274,6 +314,8 @@ async def allocation(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -291,6 +333,9 @@ async def component_templates(
self,
*,
name: t.Optional[str] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -330,6 +375,9 @@ async def component_templates(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -346,6 +394,14 @@ async def component_templates(
:param name: The name of the component template. It accepts wildcard expressions.
If it is omitted, all component templates are returned.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -360,6 +416,12 @@ async def component_templates(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -370,6 +432,8 @@ async def component_templates(
__path_parts = {}
__path = "/_cat/component_templates"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -390,6 +454,8 @@ async def component_templates(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -407,6 +473,9 @@ async def count(
self,
*,
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -419,7 +488,11 @@ async def count(
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -437,15 +510,33 @@ async def count(
:param index: A comma-separated list of data streams, indices, and aliases used
to limit the request. It supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -456,6 +547,8 @@ async def count(
__path_parts = {}
__path = "/_cat/count"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -470,8 +563,12 @@ async def count(
__query["human"] = human
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -507,6 +604,9 @@ async def fielddata(
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -522,7 +622,14 @@ async def fielddata(
:param fields: Comma-separated list of fields used to limit returned information.
To retrieve all fields, omit this parameter.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -532,6 +639,12 @@ async def fielddata(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -560,6 +673,8 @@ async def fielddata(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -576,6 +691,9 @@ async def fielddata(
async def health(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -652,6 +770,14 @@ async def health(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -661,13 +787,20 @@ async def health(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param ts: If true, returns `HH:MM:SS` and Unix epoch timestamps.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/health"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -1092,7 +1225,14 @@ async def indices(
:param index: Comma-separated list of data streams, indices, and aliases used
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param expand_wildcards: The type of index that wildcard patterns can match.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
@@ -1109,7 +1249,12 @@ async def indices(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -1166,6 +1311,9 @@ async def indices(
async def master(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -1181,6 +1329,9 @@ async def master(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -1193,6 +1344,14 @@ async def master(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -1207,11 +1366,19 @@ async def master(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/master"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -1232,6 +1399,8 @@ async def master(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -1375,7 +1544,14 @@ async def ml_data_frame_analytics(
:param id: The ID of the data frame analytics to fetch
:param allow_no_match: Whether to ignore if a wildcard expression matches no
configs. (This includes `_all` string or when no configs have been specified)
- :param bytes: The unit in which to display byte values
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: Comma-separated list of column names to display.
@@ -1383,7 +1559,12 @@ async def ml_data_frame_analytics(
be combined with any other query string option.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -1434,6 +1615,9 @@ async def ml_datafeeds(
*,
datafeed_id: t.Optional[str] = None,
allow_no_match: t.Optional[bool] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -1549,6 +1733,14 @@ async def ml_datafeeds(
array when there are no matches and the subset of results when there are
partial matches. If `false`, the API returns a 404 status code when there
are no matches or only partial matches.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: Comma-separated list of column names to display.
@@ -1556,7 +1748,12 @@ async def ml_datafeeds(
be combined with any other query string option.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -1569,6 +1766,8 @@ async def ml_datafeeds(
__query: t.Dict[str, t.Any] = {}
if allow_no_match is not None:
__query["allow_no_match"] = allow_no_match
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -1914,7 +2113,14 @@ async def ml_jobs(
array when there are no matches and the subset of results when there are
partial matches. If `false`, the API returns a 404 status code when there
are no matches or only partial matches.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: Comma-separated list of column names to display.
@@ -1922,7 +2128,12 @@ async def ml_jobs(
be combined with any other query string option.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -2099,7 +2310,14 @@ async def ml_trained_models(
when there are no matches and the subset of results when there are partial
matches. If `false`, the API returns a 404 status code when there are no
matches or only partial matches.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param from_: Skips the specified number of transforms.
@@ -2109,7 +2327,12 @@ async def ml_trained_models(
:param s: A comma-separated list of column names or aliases used to sort the
response.
:param size: The maximum number of transforms to display.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -2162,6 +2385,9 @@ async def ml_trained_models(
async def nodeattrs(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2189,6 +2415,9 @@ async def nodeattrs(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -2201,6 +2430,14 @@ async def nodeattrs(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -2215,11 +2452,19 @@ async def nodeattrs(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/nodeattrs"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2240,6 +2485,8 @@ async def nodeattrs(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -2262,7 +2509,7 @@ async def nodes(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
- full_id: t.Optional[t.Union[bool, str]] = None,
+ full_id: t.Optional[bool] = None,
h: t.Optional[
t.Union[
t.Sequence[
@@ -2478,7 +2725,14 @@ async def nodes(
``_
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param full_id: If `true`, return the full node ID. If `false`, return the shortened
@@ -2493,7 +2747,12 @@ async def nodes(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
@@ -2541,6 +2800,9 @@ async def nodes(
async def pending_tasks(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2578,6 +2840,14 @@ async def pending_tasks(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -2592,12 +2862,19 @@ async def pending_tasks(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/pending_tasks"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2636,6 +2913,9 @@ async def pending_tasks(
async def plugins(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2659,6 +2939,9 @@ async def plugins(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -2671,6 +2954,14 @@ async def plugins(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -2686,11 +2977,19 @@ async def plugins(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/plugins"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2713,6 +3012,8 @@ async def plugins(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -2831,7 +3132,14 @@ async def recovery(
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
:param active_only: If `true`, the response only includes ongoing shard recoveries.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param detailed: If `true`, the response includes detailed information about
shard recoveries.
:param format: Specifies the format to return the columnar data in, can be set
@@ -2843,7 +3151,12 @@ async def recovery(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -2894,6 +3207,9 @@ async def recovery(
async def repositories(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2904,6 +3220,9 @@ async def repositories(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -2916,6 +3235,14 @@ async def repositories(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
@@ -2929,11 +3256,19 @@ async def repositories(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/repositories"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2954,6 +3289,8 @@ async def repositories(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -3029,6 +3366,9 @@ async def segments(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -3045,7 +3385,14 @@ async def segments(
:param index: A comma-separated list of data streams, indices, and aliases used
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -3060,6 +3407,12 @@ async def segments(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3092,6 +3445,8 @@ async def segments(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -3295,7 +3650,14 @@ async def shards(
:param index: A comma-separated list of data streams, indices, and aliases used
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
@@ -3305,7 +3667,12 @@ async def shards(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3355,6 +3722,9 @@ async def snapshots(
self,
*,
repository: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -3425,6 +3795,14 @@ async def snapshots(
:param repository: A comma-separated list of snapshot repositories used to limit
the request. Accepts wildcard expressions. `_all` returns all repositories.
If any repository fails during the request, Elasticsearch returns an error.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -3437,7 +3815,12 @@ async def snapshots(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3448,6 +3831,8 @@ async def snapshots(
__path_parts = {}
__path = "/_cat/snapshots"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -3488,6 +3873,9 @@ async def tasks(
self,
*,
actions: t.Optional[t.Sequence[str]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
detailed: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3562,6 +3950,14 @@ async def tasks(
``_
:param actions: The task action names, which are used to limit the response.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param detailed: If `true`, the response includes detailed information about
shard recoveries.
:param format: Specifies the format to return the columnar data in, can be set
@@ -3576,7 +3972,12 @@ async def tasks(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param timeout: Period to wait for a response. If no response is received before
the timeout expires, the request fails and returns an error.
:param v: When set to `true` will enable verbose output.
@@ -3588,6 +3989,8 @@ async def tasks(
__query: t.Dict[str, t.Any] = {}
if actions is not None:
__query["actions"] = actions
+ if bytes is not None:
+ __query["bytes"] = bytes
if detailed is not None:
__query["detailed"] = detailed
if error_trace is not None:
@@ -3633,6 +4036,9 @@ async def templates(
self,
*,
name: t.Optional[str] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -3660,6 +4066,9 @@ async def templates(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -3675,6 +4084,14 @@ async def templates(
:param name: The name of the template to return. Accepts wildcard expressions.
If omitted, all templates are returned.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -3689,6 +4106,12 @@ async def templates(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3699,6 +4122,8 @@ async def templates(
__path_parts = {}
__path = "/_cat/templates"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -3719,6 +4144,8 @@ async def templates(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -3736,6 +4163,9 @@ async def thread_pool(
self,
*,
thread_pool_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -3819,6 +4249,14 @@ async def thread_pool(
:param thread_pool_patterns: A comma-separated list of thread pool names used
to limit the request. Accepts wildcard expressions.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
@@ -3832,7 +4270,12 @@ async def thread_pool(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3843,6 +4286,8 @@ async def thread_pool(
__path_parts = {}
__path = "/_cat/thread_pool"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -3885,6 +4330,9 @@ async def transforms(
*,
transform_id: t.Optional[str] = None,
allow_no_match: t.Optional[bool] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -4084,6 +4532,14 @@ async def transforms(
array when there are no matches and the subset of results when there are
partial matches. If `false`, the request returns a 404 status code when there
are no matches or only partial matches.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param from_: Skips the specified number of transforms.
@@ -4093,7 +4549,12 @@ async def transforms(
:param s: Comma-separated list of column names or column aliases used to sort
the response.
:param size: The maximum number of transforms to obtain.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -4106,6 +4567,8 @@ async def transforms(
__query: t.Dict[str, t.Any] = {}
if allow_no_match is not None:
__query["allow_no_match"] = allow_no_match
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
diff --git a/elasticsearch/_async/client/eql.py b/elasticsearch/_async/client/eql.py
index 98ee4f4e8..66e70037c 100644
--- a/elasticsearch/_async/client/eql.py
+++ b/elasticsearch/_async/client/eql.py
@@ -229,6 +229,7 @@ async def search(
keep_on_completion: t.Optional[bool] = None,
max_samples_per_key: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
result_position: t.Optional[t.Union[str, t.Literal["head", "tail"]]] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
size: t.Optional[int] = None,
@@ -285,6 +286,10 @@ async def search(
`size` parameter to get a smaller or larger set of samples. To retrieve more
than one sample per set of join keys, use the `max_samples_per_key` parameter.
Pipes are not supported for sample queries.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param result_position:
:param runtime_mappings:
:param size: For basic queries, the maximum number of matching events to return.
@@ -318,6 +323,8 @@ async def search(
__query["ignore_unavailable"] = ignore_unavailable
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if not __body:
if query is not None:
__body["query"] = query
diff --git a/elasticsearch/_async/client/esql.py b/elasticsearch/_async/client/esql.py
index 38e642779..79f28a8a3 100644
--- a/elasticsearch/_async/client/esql.py
+++ b/elasticsearch/_async/client/esql.py
@@ -40,6 +40,7 @@ class EsqlClient(NamespacedClient):
"columnar",
"filter",
"include_ccs_metadata",
+ "include_execution_metadata",
"keep_alive",
"keep_on_completion",
"locale",
@@ -71,6 +72,7 @@ async def async_query(
] = None,
human: t.Optional[bool] = None,
include_ccs_metadata: t.Optional[bool] = None,
+ include_execution_metadata: t.Optional[bool] = None,
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
keep_on_completion: t.Optional[bool] = None,
locale: t.Optional[str] = None,
@@ -120,7 +122,11 @@ async def async_query(
be returned if the async query doesn't finish within the timeout. The query
ID and running status are available in the `X-Elasticsearch-Async-Id` and
`X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
- :param include_ccs_metadata: When set to `true` and performing a cross-cluster
+ :param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
+ query, the response will include an extra `_clusters` object with information
+ about the clusters that participated in the search along with info such as
+ shards count.
+ :param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
query, the response will include an extra `_clusters` object with information
about the clusters that participated in the search along with info such as
shards count.
@@ -180,6 +186,8 @@ async def async_query(
__body["filter"] = filter
if include_ccs_metadata is not None:
__body["include_ccs_metadata"] = include_ccs_metadata
+ if include_execution_metadata is not None:
+ __body["include_execution_metadata"] = include_execution_metadata
if keep_alive is not None:
__body["keep_alive"] = keep_alive
if keep_on_completion is not None:
@@ -486,6 +494,7 @@ async def list_queries(
"columnar",
"filter",
"include_ccs_metadata",
+ "include_execution_metadata",
"locale",
"params",
"profile",
@@ -514,8 +523,16 @@ async def query(
] = None,
human: t.Optional[bool] = None,
include_ccs_metadata: t.Optional[bool] = None,
+ include_execution_metadata: t.Optional[bool] = None,
locale: t.Optional[str] = None,
- params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None,
+ params: t.Optional[
+ t.Sequence[
+ t.Union[
+ t.Sequence[t.Union[None, bool, float, int, str]],
+ t.Union[None, bool, float, int, str],
+ ]
+ ]
+ ] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
tables: t.Optional[
@@ -554,7 +571,11 @@ async def query(
:param format: A short version of the Accept header, e.g. json, yaml. `csv`,
`tsv`, and `txt` formats will return results in a tabular format, excluding
other metadata fields from the response.
- :param include_ccs_metadata: When set to `true` and performing a cross-cluster
+ :param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
+ query, the response will include an extra `_clusters` object with information
+ about the clusters that participated in the search along with info such as
+ shards count.
+ :param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
query, the response will include an extra `_clusters` object with information
about the clusters that participated in the search along with info such as
shards count.
@@ -600,6 +621,8 @@ async def query(
__body["filter"] = filter
if include_ccs_metadata is not None:
__body["include_ccs_metadata"] = include_ccs_metadata
+ if include_execution_metadata is not None:
+ __body["include_execution_metadata"] = include_execution_metadata
if locale is not None:
__body["locale"] = locale
if params is not None:
diff --git a/elasticsearch/_async/client/indices.py b/elasticsearch/_async/client/indices.py
index 7beaa591a..a10701a4f 100644
--- a/elasticsearch/_async/client/indices.py
+++ b/elasticsearch/_async/client/indices.py
@@ -833,7 +833,11 @@ async def create_from(
if pretty is not None:
__query["pretty"] = pretty
__body = create_from if create_from is not None else body
- __headers = {"accept": "application/json", "content-type": "application/json"}
+ if not __body:
+ __body = None
+ __headers = {"accept": "application/json"}
+ if __body is not None:
+ __headers["content-type"] = "application/json"
return await self.perform_request( # type: ignore[return-value]
"PUT",
__path,
@@ -1393,6 +1397,7 @@ async def disk_usage(
NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index store_size
value because some small metadata files are ignored and some parts of data files might not be scanned by the API.
Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
The stored size of the _id
field is likely underestimated while the _source
field is overestimated.
+ For usage examples see the External documentation or refer to Analyze the index disk usage example for an example.
``_
@@ -4677,6 +4682,7 @@ async def refresh(
For data streams, the API runs the refresh operation on the stream’s backing indices.
By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
You can change this default interval with the index.refresh_interval
setting.
+ In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.
Refresh requests are synchronous and do not return a response until the refresh operation completes.
Refreshes are resource-intensive.
To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.
@@ -5076,6 +5082,7 @@ async def resolve_index(
]
] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
) -> ObjectApiResponse[t.Any]:
"""
.. raw:: html
@@ -5103,6 +5110,10 @@ async def resolve_index(
a missing or closed index.
:param mode: Filter indices by index mode - standard, lookup, time_series, etc.
Comma-separated list of IndexMode. Empty means no filter.
+ :param project_routing: Specifies a subset of projects to target using project
+ metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
+ the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
+ _alias:_origin _alias:*pr* Supported in serverless only.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
@@ -5125,6 +5136,8 @@ async def resolve_index(
__query["mode"] = mode
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
__headers = {"accept": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"GET",
@@ -5556,7 +5569,9 @@ async def shrink(
path_parts=__path_parts,
)
- @_rewrite_parameters()
+ @_rewrite_parameters(
+ body_name="index_template",
+ )
async def simulate_index_template(
self,
*,
@@ -5567,6 +5582,8 @@ async def simulate_index_template(
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
include_defaults: t.Optional[bool] = None,
+ index_template: t.Optional[t.Mapping[str, t.Any]] = None,
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
@@ -5586,12 +5603,19 @@ async def simulate_index_template(
only be dry-run added if new or can also replace an existing one
:param include_defaults: If true, returns all relevant default configurations
for the index template.
+ :param index_template:
:param master_timeout: Period to wait for a connection to the master node. If
no response is received before the timeout expires, the request fails and
returns an error.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
+ if index_template is None and body is None:
+ raise ValueError(
+ "Empty value passed for parameters 'index_template' and 'body', one of them should be set."
+ )
+ elif index_template is not None and body is not None:
+ raise ValueError("Cannot set both 'index_template' and 'body'")
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
__path = f'/_index_template/_simulate_index/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
@@ -5611,12 +5635,18 @@ async def simulate_index_template(
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
+ __body = index_template if index_template is not None else body
+ if not __body:
+ __body = None
__headers = {"accept": "application/json"}
+ if __body is not None:
+ __headers["content-type"] = "application/json"
return await self.perform_request( # type: ignore[return-value]
"POST",
__path,
params=__query,
headers=__headers,
+ body=__body,
endpoint_id="indices.simulate_index_template",
path_parts=__path_parts,
)
diff --git a/elasticsearch/_async/client/inference.py b/elasticsearch/_async/client/inference.py
index 16e63938d..3ba670b13 100644
--- a/elasticsearch/_async/client/inference.py
+++ b/elasticsearch/_async/client/inference.py
@@ -1239,6 +1239,103 @@ async def put_cohere(
path_parts=__path_parts,
)
+ @_rewrite_parameters(
+ body_fields=(
+ "service",
+ "service_settings",
+ "chunking_settings",
+ "task_settings",
+ ),
+ )
+ async def put_contextualai(
+ self,
+ *,
+ task_type: t.Union[str, t.Literal["rerank"]],
+ contextualai_inference_id: str,
+ service: t.Optional[t.Union[str, t.Literal["contextualai"]]] = None,
+ service_settings: t.Optional[t.Mapping[str, t.Any]] = None,
+ chunking_settings: t.Optional[t.Mapping[str, t.Any]] = None,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ pretty: t.Optional[bool] = None,
+ task_settings: t.Optional[t.Mapping[str, t.Any]] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ body: t.Optional[t.Dict[str, t.Any]] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Create an Contextual AI inference endpoint.
+ Create an inference endpoint to perform an inference task with the contexualai
service.
+ To review the available rerank
models, refer to https://docs.contextual.ai/api-reference/rerank/rerank#body-model.
+
+
+ ``_
+
+ :param task_type: The type of the inference task that the model will perform.
+ :param contextualai_inference_id: The unique identifier of the inference endpoint.
+ :param service: The type of service supported for the specified task type. In
+ this case, `contextualai`.
+ :param service_settings: Settings used to install the inference model. These
+ settings are specific to the `contextualai` service.
+ :param chunking_settings: The chunking configuration object.
+ :param task_settings: Settings to configure the inference task. These settings
+ are specific to the task type you specified.
+ :param timeout: Specifies the amount of time to wait for the inference endpoint
+ to be created.
+ """
+ if task_type in SKIP_IN_PATH:
+ raise ValueError("Empty value passed for parameter 'task_type'")
+ if contextualai_inference_id in SKIP_IN_PATH:
+ raise ValueError(
+ "Empty value passed for parameter 'contextualai_inference_id'"
+ )
+ if service is None and body is None:
+ raise ValueError("Empty value passed for parameter 'service'")
+ if service_settings is None and body is None:
+ raise ValueError("Empty value passed for parameter 'service_settings'")
+ __path_parts: t.Dict[str, str] = {
+ "task_type": _quote(task_type),
+ "contextualai_inference_id": _quote(contextualai_inference_id),
+ }
+ __path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["contextualai_inference_id"]}'
+ __query: t.Dict[str, t.Any] = {}
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if pretty is not None:
+ __query["pretty"] = pretty
+ if timeout is not None:
+ __query["timeout"] = timeout
+ if not __body:
+ if service is not None:
+ __body["service"] = service
+ if service_settings is not None:
+ __body["service_settings"] = service_settings
+ if chunking_settings is not None:
+ __body["chunking_settings"] = chunking_settings
+ if task_settings is not None:
+ __body["task_settings"] = task_settings
+ if not __body:
+ __body = None # type: ignore[assignment]
+ __headers = {"accept": "application/json"}
+ if __body is not None:
+ __headers["content-type"] = "application/json"
+ return await self.perform_request( # type: ignore[return-value]
+ "PUT",
+ __path,
+ params=__query,
+ headers=__headers,
+ body=__body,
+ endpoint_id="inference.put_contextualai",
+ path_parts=__path_parts,
+ )
+
@_rewrite_parameters(
body_fields=(
"service",
@@ -2672,7 +2769,7 @@ async def sparse_embedding(
)
@_rewrite_parameters(
- body_fields=("input", "task_settings"),
+ body_fields=("input", "input_type", "task_settings"),
)
async def text_embedding(
self,
@@ -2682,6 +2779,7 @@ async def text_embedding(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
+ input_type: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
task_settings: t.Optional[t.Any] = None,
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
@@ -2697,6 +2795,13 @@ async def text_embedding(
:param inference_id: The inference Id
:param input: Inference input. Either a string or an array of strings.
+ :param input_type: The input data type for the text embedding model. Possible
+ values include: * `SEARCH` * `INGEST` * `CLASSIFICATION` * `CLUSTERING` Not
+ all services support all values. Unsupported values will trigger a validation
+ exception. Accepted values depend on the configured inference service, refer
+ to the relevant service-specific documentation for more info. > info > The
+ `input_type` parameter specified on the root level of the request body will
+ take precedence over the `input_type` parameter specified in `task_settings`.
:param task_settings: Optional task settings
:param timeout: Specifies the amount of time to wait for the inference request
to complete.
@@ -2722,6 +2827,8 @@ async def text_embedding(
if not __body:
if input is not None:
__body["input"] = input
+ if input_type is not None:
+ __body["input_type"] = input_type
if task_settings is not None:
__body["task_settings"] = task_settings
if not __body:
diff --git a/elasticsearch/_async/client/ingest.py b/elasticsearch/_async/client/ingest.py
index 3cd0260d5..336169a90 100644
--- a/elasticsearch/_async/client/ingest.py
+++ b/elasticsearch/_async/client/ingest.py
@@ -580,6 +580,7 @@ async def put_ip_location_database(
body_fields=(
"deprecated",
"description",
+ "field_access_pattern",
"meta",
"on_failure",
"processors",
@@ -594,6 +595,9 @@ async def put_pipeline(
deprecated: t.Optional[bool] = None,
description: t.Optional[str] = None,
error_trace: t.Optional[bool] = None,
+ field_access_pattern: t.Optional[
+ t.Union[str, t.Literal["classic", "flexible"]]
+ ] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
if_version: t.Optional[int] = None,
@@ -621,6 +625,8 @@ async def put_pipeline(
or updating a non-deprecated index template, Elasticsearch will emit a deprecation
warning.
:param description: Description of the ingest pipeline.
+ :param field_access_pattern: Controls how processors in this pipeline should
+ read and write data on a document's source.
:param if_version: Required version for optimistic concurrency control for pipeline
updates
:param master_timeout: Period to wait for a connection to the master node. If
@@ -667,6 +673,8 @@ async def put_pipeline(
__body["deprecated"] = deprecated
if description is not None:
__body["description"] = description
+ if field_access_pattern is not None:
+ __body["field_access_pattern"] = field_access_pattern
if meta is not None:
__body["_meta"] = meta
if on_failure is not None:
diff --git a/elasticsearch/_async/client/license.py b/elasticsearch/_async/client/license.py
index ba389d0d5..2a5c35189 100644
--- a/elasticsearch/_async/client/license.py
+++ b/elasticsearch/_async/client/license.py
@@ -104,8 +104,10 @@ async def get(
license types. If `false`, this parameter returns platinum for both platinum
and enterprise license types. This behavior is maintained for backwards compatibility.
This parameter is deprecated and will always be set to true in 8.x.
- :param local: Specifies whether to retrieve local information. The default value
- is `false`, which means the information is retrieved from the master node.
+ :param local: Specifies whether to retrieve local information. From 9.2 onwards
+ the default value is `true`, which means the information is retrieved from
+ the responding node. In earlier versions the default is `false`, which means
+ the information is retrieved from the elected master node.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_license"
diff --git a/elasticsearch/_async/client/logstash.py b/elasticsearch/_async/client/logstash.py
index c63983710..c724911dc 100644
--- a/elasticsearch/_async/client/logstash.py
+++ b/elasticsearch/_async/client/logstash.py
@@ -141,7 +141,9 @@ async def put_pipeline(
``_
- :param id: An identifier for the pipeline.
+ :param id: An identifier for the pipeline. Pipeline IDs must begin with a letter
+ or underscore and contain only letters, underscores, dashes, hyphens and
+ numbers.
:param pipeline:
"""
if id in SKIP_IN_PATH:
diff --git a/elasticsearch/_async/client/ml.py b/elasticsearch/_async/client/ml.py
index fb5af673f..b3b18df4c 100644
--- a/elasticsearch/_async/client/ml.py
+++ b/elasticsearch/_async/client/ml.py
@@ -2390,7 +2390,7 @@ async def get_overall_buckets(
exclude_interim: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- overall_score: t.Optional[t.Union[float, str]] = None,
+ overall_score: t.Optional[float] = None,
pretty: t.Optional[bool] = None,
start: t.Optional[t.Union[str, t.Any]] = None,
top_n: t.Optional[int] = None,
diff --git a/elasticsearch/_async/client/nodes.py b/elasticsearch/_async/client/nodes.py
index 1b007e7cb..d1f47c679 100644
--- a/elasticsearch/_async/client/nodes.py
+++ b/elasticsearch/_async/client/nodes.py
@@ -368,9 +368,7 @@ async def stats(
human: t.Optional[bool] = None,
include_segment_file_sizes: t.Optional[bool] = None,
include_unloaded_segments: t.Optional[bool] = None,
- level: t.Optional[
- t.Union[str, t.Literal["cluster", "indices", "shards"]]
- ] = None,
+ level: t.Optional[t.Union[str, t.Literal["indices", "node", "shards"]]] = None,
pretty: t.Optional[bool] = None,
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
types: t.Optional[t.Sequence[str]] = None,
diff --git a/elasticsearch/_async/client/project.py b/elasticsearch/_async/client/project.py
new file mode 100644
index 000000000..76f260577
--- /dev/null
+++ b/elasticsearch/_async/client/project.py
@@ -0,0 +1,68 @@
+# Licensed to Elasticsearch B.V. under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Elasticsearch B.V. licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+import typing as t
+
+from elastic_transport import ObjectApiResponse
+
+from ._base import NamespacedClient
+from .utils import (
+ Stability,
+ _rewrite_parameters,
+ _stability_warning,
+)
+
+
+class ProjectClient(NamespacedClient):
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ async def tags(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ pretty: t.Optional[bool] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Return tags defined for the project
+
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_project/tags"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if pretty is not None:
+ __query["pretty"] = pretty
+ __headers = {"accept": "application/json"}
+ return await self.perform_request( # type: ignore[return-value]
+ "GET",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="project.tags",
+ path_parts=__path_parts,
+ )
diff --git a/elasticsearch/_async/client/security.py b/elasticsearch/_async/client/security.py
index 516906ce8..de094aa03 100644
--- a/elasticsearch/_async/client/security.py
+++ b/elasticsearch/_async/client/security.py
@@ -2052,6 +2052,45 @@ async def get_settings(
path_parts=__path_parts,
)
+ @_rewrite_parameters()
+ async def get_stats(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ pretty: t.Optional[bool] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Get security stats.
+ Gather security usage statistics from all node(s) within the cluster.
+
+
+ ``_
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_security/stats"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if pretty is not None:
+ __query["pretty"] = pretty
+ __headers = {"accept": "application/json"}
+ return await self.perform_request( # type: ignore[return-value]
+ "GET",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="security.get_stats",
+ path_parts=__path_parts,
+ )
+
@_rewrite_parameters(
body_fields=(
"grant_type",
diff --git a/elasticsearch/_async/client/shutdown.py b/elasticsearch/_async/client/shutdown.py
index 5dbc33e92..9502d1fe6 100644
--- a/elasticsearch/_async/client/shutdown.py
+++ b/elasticsearch/_async/client/shutdown.py
@@ -33,13 +33,9 @@ async def delete_node(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- master_timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
- timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
) -> ObjectApiResponse[t.Any]:
"""
.. raw:: html
@@ -97,9 +93,7 @@ async def get_node(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- master_timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
@@ -162,14 +156,10 @@ async def put_node(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- master_timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
target_node_name: t.Optional[str] = None,
- timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
diff --git a/elasticsearch/_async/client/sql.py b/elasticsearch/_async/client/sql.py
index de423ea66..9e146e0f8 100644
--- a/elasticsearch/_async/client/sql.py
+++ b/elasticsearch/_async/client/sql.py
@@ -285,6 +285,7 @@ async def query(
page_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
params: t.Optional[t.Sequence[t.Any]] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
query: t.Optional[str] = None,
request_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
@@ -332,6 +333,10 @@ async def query(
is no longer available. Subsequent scroll requests prolong the lifetime of
the scroll cursor by the duration of `page_timeout` in the scroll request.
:param params: The values for parameters in the query.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param query: The SQL query to run.
:param request_timeout: The timeout before the request fails.
:param runtime_mappings: One or more runtime fields for the search request. These
@@ -357,6 +362,8 @@ async def query(
__query["human"] = human
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if not __body:
if allow_partial_search_results is not None:
__body["allow_partial_search_results"] = allow_partial_search_results
diff --git a/elasticsearch/_async/client/streams.py b/elasticsearch/_async/client/streams.py
new file mode 100644
index 000000000..622721bda
--- /dev/null
+++ b/elasticsearch/_async/client/streams.py
@@ -0,0 +1,186 @@
+# Licensed to Elasticsearch B.V. under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Elasticsearch B.V. licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import typing as t
+
+from elastic_transport import ObjectApiResponse, TextApiResponse
+
+from ._base import NamespacedClient
+from .utils import (
+ Stability,
+ _rewrite_parameters,
+ _stability_warning,
+)
+
+
+class StreamsClient(NamespacedClient):
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ async def logs_disable(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ pretty: t.Optional[bool] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
+ """
+ .. raw:: html
+
+ Disable logs stream.
+ Turn off the logs stream feature for this cluster.
+
+
+ ``_
+
+ :param master_timeout: The period to wait for a connection to the master node.
+ If no response is received before the timeout expires, the request fails
+ and returns an error.
+ :param timeout: The period to wait for a response. If no response is received
+ before the timeout expires, the request fails and returns an error.
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_streams/logs/_disable"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if master_timeout is not None:
+ __query["master_timeout"] = master_timeout
+ if pretty is not None:
+ __query["pretty"] = pretty
+ if timeout is not None:
+ __query["timeout"] = timeout
+ __headers = {"accept": "application/json,text/plain"}
+ return await self.perform_request( # type: ignore[return-value]
+ "POST",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="streams.logs_disable",
+ path_parts=__path_parts,
+ )
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ async def logs_enable(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ pretty: t.Optional[bool] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
+ """
+ .. raw:: html
+
+ Enable logs stream.
+ Turn on the logs stream feature for this cluster.
+ NOTE: To protect existing data, this feature can be turned on only if the
+ cluster does not have existing indices or data streams that match the pattern logs|logs.*
.
+ If those indices or data streams exist, a 409 - Conflict
response and error is returned.
+
+
+ ``_
+
+ :param master_timeout: The period to wait for a connection to the master node.
+ If no response is received before the timeout expires, the request fails
+ and returns an error.
+ :param timeout: The period to wait for a response. If no response is received
+ before the timeout expires, the request fails and returns an error.
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_streams/logs/_enable"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if master_timeout is not None:
+ __query["master_timeout"] = master_timeout
+ if pretty is not None:
+ __query["pretty"] = pretty
+ if timeout is not None:
+ __query["timeout"] = timeout
+ __headers = {"accept": "application/json,text/plain"}
+ return await self.perform_request( # type: ignore[return-value]
+ "POST",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="streams.logs_enable",
+ path_parts=__path_parts,
+ )
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ async def status(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ master_timeout: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
+ pretty: t.Optional[bool] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Get the status of streams.
+ Get the current status for all types of streams.
+
+
+ ``_
+
+ :param master_timeout: Period to wait for a connection to the master node. If
+ no response is received before the timeout expires, the request fails and
+ returns an error.
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_streams/status"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if master_timeout is not None:
+ __query["master_timeout"] = master_timeout
+ if pretty is not None:
+ __query["pretty"] = pretty
+ __headers = {"accept": "application/json"}
+ return await self.perform_request( # type: ignore[return-value]
+ "GET",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="streams.status",
+ path_parts=__path_parts,
+ )
diff --git a/elasticsearch/_async/client/watcher.py b/elasticsearch/_async/client/watcher.py
index e0b7b39ec..8558b9920 100644
--- a/elasticsearch/_async/client/watcher.py
+++ b/elasticsearch/_async/client/watcher.py
@@ -552,11 +552,7 @@ async def put_watch(
__body["transform"] = transform
if trigger is not None:
__body["trigger"] = trigger
- if not __body:
- __body = None # type: ignore[assignment]
- __headers = {"accept": "application/json"}
- if __body is not None:
- __headers["content-type"] = "application/json"
+ __headers = {"accept": "application/json", "content-type": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"PUT",
__path,
diff --git a/elasticsearch/_sync/client/__init__.py b/elasticsearch/_sync/client/__init__.py
index 4f97411c1..ad0a03682 100644
--- a/elasticsearch/_sync/client/__init__.py
+++ b/elasticsearch/_sync/client/__init__.py
@@ -887,6 +887,7 @@ def count(
min_score: t.Optional[float] = None,
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
q: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
routing: t.Optional[str] = None,
@@ -941,6 +942,10 @@ def count(
in the result.
:param preference: The node or shard the operation should be performed on. By
default, it is random.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param q: The query in Lucene query string syntax. This parameter cannot be used
with a request body.
:param query: Defines the search query using Query DSL. A request body query
@@ -993,6 +998,8 @@ def count(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if q is not None:
__query["q"] = q
if routing is not None:
@@ -2131,6 +2138,7 @@ def field_caps(
include_unmapped: t.Optional[bool] = None,
index_filter: t.Optional[t.Mapping[str, t.Any]] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
types: t.Optional[t.Sequence[str]] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
@@ -2174,6 +2182,11 @@ def field_caps(
deleted documents) are outside of the provided range. However, not all queries
can rewrite to `match_none` so this API may return an index even if the provided
filter matches no document.
+ :param project_routing: Specifies a subset of projects to target for the field-caps
+ query using project metadata tags in a subset of Lucene query syntax. Allowed
+ Lucene queries: the _alias tag and a single value (possibly wildcarded).
+ Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
+ only.
:param runtime_mappings: Define ad-hoc runtime fields in the request similar
to the way it is done in search requests. These fields exist only as part
of the query and take precedence over fields defined with the same name in
@@ -2211,6 +2224,8 @@ def field_caps(
__query["include_unmapped"] = include_unmapped
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if types is not None:
__query["types"] = types
if not __body:
@@ -3149,6 +3164,7 @@ def msearch(
max_concurrent_shard_requests: t.Optional[int] = None,
pre_filter_shard_size: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
routing: t.Optional[str] = None,
search_type: t.Optional[
@@ -3210,6 +3226,10 @@ def msearch(
roundtrip can limit the number of shards significantly if for instance a
shard can not match any documents based on its rewrite method i.e., if date
filters are mandatory to match but the shard bounds and the query are disjoint.
+ :param project_routing: Specifies a subset of projects to target for a search
+ using project metadata tags in a subset Lucene syntax. Allowed Lucene queries:
+ the _alias tag and a single value (possible wildcarded). Examples: _alias:my-project
+ _alias:_origin _alias:*pr* Supported in serverless only.
:param rest_total_hits_as_int: If true, hits.total are returned as an integer
in the response. Defaults to false, which returns an object.
:param routing: Custom routing value used to route search operations to a specific
@@ -3259,6 +3279,8 @@ def msearch(
__query["pre_filter_shard_size"] = pre_filter_shard_size
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if rest_total_hits_as_int is not None:
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
if routing is not None:
@@ -3297,6 +3319,7 @@ def msearch_template(
human: t.Optional[bool] = None,
max_concurrent_searches: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
search_type: t.Optional[
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
@@ -3330,6 +3353,10 @@ def msearch_template(
for cross-cluster search requests.
:param max_concurrent_searches: The maximum number of concurrent searches the
API can run.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param rest_total_hits_as_int: If `true`, the response returns `hits.total` as
an integer. If `false`, it returns `hits.total` as an object.
:param search_type: The type of the search operation.
@@ -3362,6 +3389,8 @@ def msearch_template(
__query["max_concurrent_searches"] = max_concurrent_searches
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if rest_total_hits_as_int is not None:
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
if search_type is not None:
@@ -3532,6 +3561,7 @@ def open_point_in_time(
max_concurrent_shard_requests: t.Optional[int] = None,
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
routing: t.Optional[str] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
@@ -3588,6 +3618,11 @@ def open_point_in_time(
that each sub-search request executes per node.
:param preference: The node or shard the operation should be performed on. By
default, it is random.
+ :param project_routing: Specifies a subset of projects to target for the PIT
+ request using project metadata tags in a subset of Lucene query syntax. Allowed
+ Lucene queries: the _alias tag and a single value (possibly wildcarded).
+ Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
+ only.
:param routing: A custom value that is used to route operations to a specific
shard.
"""
@@ -3619,6 +3654,8 @@ def open_point_in_time(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if routing is not None:
__query["routing"] = routing
if not __body:
@@ -4375,6 +4412,7 @@ def search(
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
q: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
rank: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -4558,6 +4596,10 @@ def search(
:param profile: Set to `true` to return detailed timing information about the
execution of individual components in a search request. NOTE: This is a debugging
tool and adds significant overhead to search execution.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param q: A query in the Lucene query string syntax. Query parameter searches
do not support the full Elasticsearch Query DSL but are handy for testing.
IMPORTANT: This parameter overrides the query parameter in the request body.
@@ -4712,6 +4754,8 @@ def search(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if q is not None:
__query["q"] = q
if request_cache is not None:
@@ -4866,6 +4910,7 @@ def search_mvt(
] = None,
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
size: t.Optional[int] = None,
@@ -5183,6 +5228,10 @@ def search_mvt(
In the aggs layer, each feature represents a `geotile_grid` cell. If `grid,
each feature is a polygon of the cells bounding box. If `point`, each feature
is a Point that is the centroid of the cell.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param query: The query DSL used to filter documents for the search.
:param runtime_mappings: Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
@@ -5246,6 +5295,8 @@ def search_mvt(
__query["human"] = human
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if not __body:
if aggs is not None:
__body["aggs"] = aggs
@@ -5419,6 +5470,7 @@ def search_template(
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
routing: t.Optional[str] = None,
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
@@ -5464,6 +5516,10 @@ def search_template(
:param preference: The node or shard the operation should be performed on. It
is random by default.
:param profile: If `true`, the query execution is profiled.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param rest_total_hits_as_int: If `true`, `hits.total` is rendered as an integer
in the response. If `false`, it is rendered as an object.
:param routing: A custom value used to route operations to a specific shard.
@@ -5505,6 +5561,8 @@ def search_template(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if rest_total_hits_as_int is not None:
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
if routing is not None:
diff --git a/elasticsearch/_sync/client/async_search.py b/elasticsearch/_sync/client/async_search.py
index 3042ae07a..31e53f89b 100644
--- a/elasticsearch/_sync/client/async_search.py
+++ b/elasticsearch/_sync/client/async_search.py
@@ -287,6 +287,7 @@ def submit(
preference: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
q: t.Optional[str] = None,
query: t.Optional[t.Mapping[str, t.Any]] = None,
request_cache: t.Optional[bool] = None,
@@ -408,6 +409,10 @@ def submit(
:param preference: Specify the node or shard the operation should be performed
on (default: random)
:param profile:
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param q: Query in the Lucene query string syntax
:param query: Defines the search definition using the Query DSL.
:param request_cache: Specify if request cache should be used for this request
@@ -528,6 +533,8 @@ def submit(
__query["preference"] = preference
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if q is not None:
__query["q"] = q
if request_cache is not None:
diff --git a/elasticsearch/_sync/client/cat.py b/elasticsearch/_sync/client/cat.py
index 5349a32ec..d87b347e8 100644
--- a/elasticsearch/_sync/client/cat.py
+++ b/elasticsearch/_sync/client/cat.py
@@ -36,6 +36,9 @@ def aliases(
self,
*,
name: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
expand_wildcards: t.Optional[
t.Union[
@@ -80,6 +83,9 @@ def aliases(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -95,6 +101,14 @@ def aliases(
:param name: A comma-separated list of aliases to retrieve. Supports wildcards
(`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param expand_wildcards: The type of index that wildcard patterns can match.
If the request can target data streams, this argument determines whether
wildcard expressions match hidden data streams. It supports comma-separated
@@ -112,6 +126,12 @@ def aliases(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -122,6 +142,8 @@ def aliases(
__path_parts = {}
__path = "/_cat/aliases"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if expand_wildcards is not None:
@@ -142,6 +164,8 @@ def aliases(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -213,6 +237,9 @@ def allocation(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -227,7 +254,14 @@ def allocation(
:param node_id: A comma-separated list of node identifiers or names used to limit
the returned information.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -242,6 +276,12 @@ def allocation(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -274,6 +314,8 @@ def allocation(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -291,6 +333,9 @@ def component_templates(
self,
*,
name: t.Optional[str] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -330,6 +375,9 @@ def component_templates(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -346,6 +394,14 @@ def component_templates(
:param name: The name of the component template. It accepts wildcard expressions.
If it is omitted, all component templates are returned.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -360,6 +416,12 @@ def component_templates(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -370,6 +432,8 @@ def component_templates(
__path_parts = {}
__path = "/_cat/component_templates"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -390,6 +454,8 @@ def component_templates(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -407,6 +473,9 @@ def count(
self,
*,
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -419,7 +488,11 @@ def count(
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -437,15 +510,33 @@ def count(
:param index: A comma-separated list of data streams, indices, and aliases used
to limit the request. It supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -456,6 +547,8 @@ def count(
__path_parts = {}
__path = "/_cat/count"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -470,8 +563,12 @@ def count(
__query["human"] = human
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -507,6 +604,9 @@ def fielddata(
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -522,7 +622,14 @@ def fielddata(
:param fields: Comma-separated list of fields used to limit returned information.
To retrieve all fields, omit this parameter.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -532,6 +639,12 @@ def fielddata(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -560,6 +673,8 @@ def fielddata(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -576,6 +691,9 @@ def fielddata(
def health(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -652,6 +770,14 @@ def health(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -661,13 +787,20 @@ def health(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param ts: If true, returns `HH:MM:SS` and Unix epoch timestamps.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/health"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -1092,7 +1225,14 @@ def indices(
:param index: Comma-separated list of data streams, indices, and aliases used
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param expand_wildcards: The type of index that wildcard patterns can match.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
@@ -1109,7 +1249,12 @@ def indices(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -1166,6 +1311,9 @@ def indices(
def master(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -1181,6 +1329,9 @@ def master(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -1193,6 +1344,14 @@ def master(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -1207,11 +1366,19 @@ def master(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/master"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -1232,6 +1399,8 @@ def master(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -1375,7 +1544,14 @@ def ml_data_frame_analytics(
:param id: The ID of the data frame analytics to fetch
:param allow_no_match: Whether to ignore if a wildcard expression matches no
configs. (This includes `_all` string or when no configs have been specified)
- :param bytes: The unit in which to display byte values
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: Comma-separated list of column names to display.
@@ -1383,7 +1559,12 @@ def ml_data_frame_analytics(
be combined with any other query string option.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -1434,6 +1615,9 @@ def ml_datafeeds(
*,
datafeed_id: t.Optional[str] = None,
allow_no_match: t.Optional[bool] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -1549,6 +1733,14 @@ def ml_datafeeds(
array when there are no matches and the subset of results when there are
partial matches. If `false`, the API returns a 404 status code when there
are no matches or only partial matches.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: Comma-separated list of column names to display.
@@ -1556,7 +1748,12 @@ def ml_datafeeds(
be combined with any other query string option.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -1569,6 +1766,8 @@ def ml_datafeeds(
__query: t.Dict[str, t.Any] = {}
if allow_no_match is not None:
__query["allow_no_match"] = allow_no_match
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -1914,7 +2113,14 @@ def ml_jobs(
array when there are no matches and the subset of results when there are
partial matches. If `false`, the API returns a 404 status code when there
are no matches or only partial matches.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: Comma-separated list of column names to display.
@@ -1922,7 +2128,12 @@ def ml_jobs(
be combined with any other query string option.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -2099,7 +2310,14 @@ def ml_trained_models(
when there are no matches and the subset of results when there are partial
matches. If `false`, the API returns a 404 status code when there are no
matches or only partial matches.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param from_: Skips the specified number of transforms.
@@ -2109,7 +2327,12 @@ def ml_trained_models(
:param s: A comma-separated list of column names or aliases used to sort the
response.
:param size: The maximum number of transforms to display.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -2162,6 +2385,9 @@ def ml_trained_models(
def nodeattrs(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2189,6 +2415,9 @@ def nodeattrs(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -2201,6 +2430,14 @@ def nodeattrs(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -2215,11 +2452,19 @@ def nodeattrs(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/nodeattrs"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2240,6 +2485,8 @@ def nodeattrs(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -2262,7 +2509,7 @@ def nodes(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
- full_id: t.Optional[t.Union[bool, str]] = None,
+ full_id: t.Optional[bool] = None,
h: t.Optional[
t.Union[
t.Sequence[
@@ -2478,7 +2725,14 @@ def nodes(
``_
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param full_id: If `true`, return the full node ID. If `false`, return the shortened
@@ -2493,7 +2747,12 @@ def nodes(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
@@ -2541,6 +2800,9 @@ def nodes(
def pending_tasks(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2578,6 +2840,14 @@ def pending_tasks(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -2592,12 +2862,19 @@ def pending_tasks(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/pending_tasks"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2636,6 +2913,9 @@ def pending_tasks(
def plugins(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2659,6 +2939,9 @@ def plugins(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -2671,6 +2954,14 @@ def plugins(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -2686,11 +2977,19 @@ def plugins(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/plugins"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2713,6 +3012,8 @@ def plugins(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -2831,7 +3132,14 @@ def recovery(
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
:param active_only: If `true`, the response only includes ongoing shard recoveries.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param detailed: If `true`, the response includes detailed information about
shard recoveries.
:param format: Specifies the format to return the columnar data in, can be set
@@ -2843,7 +3151,12 @@ def recovery(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -2894,6 +3207,9 @@ def recovery(
def repositories(
self,
*,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -2904,6 +3220,9 @@ def repositories(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -2916,6 +3235,14 @@ def repositories(
``_
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
@@ -2929,11 +3256,19 @@ def repositories(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat/repositories"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -2954,6 +3289,8 @@ def repositories(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -3029,6 +3366,9 @@ def segments(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -3045,7 +3385,14 @@ def segments(
:param index: A comma-separated list of data streams, indices, and aliases used
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -3060,6 +3407,12 @@ def segments(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3092,6 +3445,8 @@ def segments(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -3295,7 +3650,14 @@ def shards(
:param index: A comma-separated list of data streams, indices, and aliases used
to limit the request. Supports wildcards (`*`). To target all data streams
and indices, omit this parameter or use `*` or `_all`.
- :param bytes: The unit used to display byte values.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
@@ -3305,7 +3667,12 @@ def shards(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3355,6 +3722,9 @@ def snapshots(
self,
*,
repository: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -3425,6 +3795,14 @@ def snapshots(
:param repository: A comma-separated list of snapshot repositories used to limit
the request. Accepts wildcard expressions. `_all` returns all repositories.
If any repository fails during the request, Elasticsearch returns an error.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -3437,7 +3815,12 @@ def snapshots(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3448,6 +3831,8 @@ def snapshots(
__path_parts = {}
__path = "/_cat/snapshots"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -3488,6 +3873,9 @@ def tasks(
self,
*,
actions: t.Optional[t.Sequence[str]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
detailed: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3562,6 +3950,14 @@ def tasks(
``_
:param actions: The task action names, which are used to limit the response.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param detailed: If `true`, the response includes detailed information about
shard recoveries.
:param format: Specifies the format to return the columnar data in, can be set
@@ -3576,7 +3972,12 @@ def tasks(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
- :param time: Unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param timeout: Period to wait for a response. If no response is received before
the timeout expires, the request fails and returns an error.
:param v: When set to `true` will enable verbose output.
@@ -3588,6 +3989,8 @@ def tasks(
__query: t.Dict[str, t.Any] = {}
if actions is not None:
__query["actions"] = actions
+ if bytes is not None:
+ __query["bytes"] = bytes
if detailed is not None:
__query["detailed"] = detailed
if error_trace is not None:
@@ -3633,6 +4036,9 @@ def templates(
self,
*,
name: t.Optional[str] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -3660,6 +4066,9 @@ def templates(
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ time: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
@@ -3675,6 +4084,14 @@ def templates(
:param name: The name of the template to return. Accepts wildcard expressions.
If omitted, all templates are returned.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: A comma-separated list of columns names to display. It supports simple
@@ -3689,6 +4106,12 @@ def templates(
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3699,6 +4122,8 @@ def templates(
__path_parts = {}
__path = "/_cat/templates"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -3719,6 +4144,8 @@ def templates(
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
+ if time is not None:
+ __query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
@@ -3736,6 +4163,9 @@ def thread_pool(
self,
*,
thread_pool_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -3819,6 +4249,14 @@ def thread_pool(
:param thread_pool_patterns: A comma-separated list of thread pool names used
to limit the request. Accepts wildcard expressions.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
@@ -3832,7 +4270,12 @@ def thread_pool(
:param s: A comma-separated list of column names or aliases that determines the
sort order. Sorting defaults to ascending and can be changed by setting `:asc`
or `:desc` as a suffix to the column name.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -3843,6 +4286,8 @@ def thread_pool(
__path_parts = {}
__path = "/_cat/thread_pool"
__query: t.Dict[str, t.Any] = {}
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
@@ -3885,6 +4330,9 @@ def transforms(
*,
transform_id: t.Optional[str] = None,
allow_no_match: t.Optional[bool] = None,
+ bytes: t.Optional[
+ t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
+ ] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
@@ -4084,6 +4532,14 @@ def transforms(
array when there are no matches and the subset of results when there are
partial matches. If `false`, the request returns a 404 status code when there
are no matches or only partial matches.
+ :param bytes: Sets the units for columns that contain a byte-size value. Note
+ that byte-size value units work in terms of powers of 1024. For instance
+ `1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
+ rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
+ numeric value of the column is as small as possible whilst still being at
+ least `1.0`. If given, byte-size values are rendered as an integer with no
+ suffix, representing the value of the column in the chosen unit. Values that
+ are not an exact multiple of the chosen unit are rounded down.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param from_: Skips the specified number of transforms.
@@ -4093,7 +4549,12 @@ def transforms(
:param s: Comma-separated list of column names or column aliases used to sort
the response.
:param size: The maximum number of transforms to obtain.
- :param time: The unit used to display time values.
+ :param time: Sets the units for columns that contain a time duration. If omitted,
+ time duration values are rendered with a suffix such as `ms`, `s`, `m` or
+ `h`, chosen such that the numeric value of the column is as small as possible
+ whilst still being at least `1.0`. If given, time duration values are rendered
+ as an integer with no suffix. Values that are not an exact multiple of the
+ chosen unit are rounded down.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
@@ -4106,6 +4567,8 @@ def transforms(
__query: t.Dict[str, t.Any] = {}
if allow_no_match is not None:
__query["allow_no_match"] = allow_no_match
+ if bytes is not None:
+ __query["bytes"] = bytes
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
diff --git a/elasticsearch/_sync/client/eql.py b/elasticsearch/_sync/client/eql.py
index 1fe0234dd..aa53d77b9 100644
--- a/elasticsearch/_sync/client/eql.py
+++ b/elasticsearch/_sync/client/eql.py
@@ -229,6 +229,7 @@ def search(
keep_on_completion: t.Optional[bool] = None,
max_samples_per_key: t.Optional[int] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
result_position: t.Optional[t.Union[str, t.Literal["head", "tail"]]] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
size: t.Optional[int] = None,
@@ -285,6 +286,10 @@ def search(
`size` parameter to get a smaller or larger set of samples. To retrieve more
than one sample per set of join keys, use the `max_samples_per_key` parameter.
Pipes are not supported for sample queries.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param result_position:
:param runtime_mappings:
:param size: For basic queries, the maximum number of matching events to return.
@@ -318,6 +323,8 @@ def search(
__query["ignore_unavailable"] = ignore_unavailable
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if not __body:
if query is not None:
__body["query"] = query
diff --git a/elasticsearch/_sync/client/esql.py b/elasticsearch/_sync/client/esql.py
index 80843c2d3..b76111b20 100644
--- a/elasticsearch/_sync/client/esql.py
+++ b/elasticsearch/_sync/client/esql.py
@@ -40,6 +40,7 @@ class EsqlClient(NamespacedClient):
"columnar",
"filter",
"include_ccs_metadata",
+ "include_execution_metadata",
"keep_alive",
"keep_on_completion",
"locale",
@@ -71,6 +72,7 @@ def async_query(
] = None,
human: t.Optional[bool] = None,
include_ccs_metadata: t.Optional[bool] = None,
+ include_execution_metadata: t.Optional[bool] = None,
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
keep_on_completion: t.Optional[bool] = None,
locale: t.Optional[str] = None,
@@ -120,7 +122,11 @@ def async_query(
be returned if the async query doesn't finish within the timeout. The query
ID and running status are available in the `X-Elasticsearch-Async-Id` and
`X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
- :param include_ccs_metadata: When set to `true` and performing a cross-cluster
+ :param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
+ query, the response will include an extra `_clusters` object with information
+ about the clusters that participated in the search along with info such as
+ shards count.
+ :param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
query, the response will include an extra `_clusters` object with information
about the clusters that participated in the search along with info such as
shards count.
@@ -180,6 +186,8 @@ def async_query(
__body["filter"] = filter
if include_ccs_metadata is not None:
__body["include_ccs_metadata"] = include_ccs_metadata
+ if include_execution_metadata is not None:
+ __body["include_execution_metadata"] = include_execution_metadata
if keep_alive is not None:
__body["keep_alive"] = keep_alive
if keep_on_completion is not None:
@@ -486,6 +494,7 @@ def list_queries(
"columnar",
"filter",
"include_ccs_metadata",
+ "include_execution_metadata",
"locale",
"params",
"profile",
@@ -514,8 +523,16 @@ def query(
] = None,
human: t.Optional[bool] = None,
include_ccs_metadata: t.Optional[bool] = None,
+ include_execution_metadata: t.Optional[bool] = None,
locale: t.Optional[str] = None,
- params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None,
+ params: t.Optional[
+ t.Sequence[
+ t.Union[
+ t.Sequence[t.Union[None, bool, float, int, str]],
+ t.Union[None, bool, float, int, str],
+ ]
+ ]
+ ] = None,
pretty: t.Optional[bool] = None,
profile: t.Optional[bool] = None,
tables: t.Optional[
@@ -554,7 +571,11 @@ def query(
:param format: A short version of the Accept header, e.g. json, yaml. `csv`,
`tsv`, and `txt` formats will return results in a tabular format, excluding
other metadata fields from the response.
- :param include_ccs_metadata: When set to `true` and performing a cross-cluster
+ :param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
+ query, the response will include an extra `_clusters` object with information
+ about the clusters that participated in the search along with info such as
+ shards count.
+ :param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
query, the response will include an extra `_clusters` object with information
about the clusters that participated in the search along with info such as
shards count.
@@ -600,6 +621,8 @@ def query(
__body["filter"] = filter
if include_ccs_metadata is not None:
__body["include_ccs_metadata"] = include_ccs_metadata
+ if include_execution_metadata is not None:
+ __body["include_execution_metadata"] = include_execution_metadata
if locale is not None:
__body["locale"] = locale
if params is not None:
diff --git a/elasticsearch/_sync/client/indices.py b/elasticsearch/_sync/client/indices.py
index 1da7357a4..7b3f4b427 100644
--- a/elasticsearch/_sync/client/indices.py
+++ b/elasticsearch/_sync/client/indices.py
@@ -833,7 +833,11 @@ def create_from(
if pretty is not None:
__query["pretty"] = pretty
__body = create_from if create_from is not None else body
- __headers = {"accept": "application/json", "content-type": "application/json"}
+ if not __body:
+ __body = None
+ __headers = {"accept": "application/json"}
+ if __body is not None:
+ __headers["content-type"] = "application/json"
return self.perform_request( # type: ignore[return-value]
"PUT",
__path,
@@ -1393,6 +1397,7 @@ def disk_usage(
NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index store_size
value because some small metadata files are ignored and some parts of data files might not be scanned by the API.
Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
The stored size of the _id
field is likely underestimated while the _source
field is overestimated.
+ For usage examples see the External documentation or refer to Analyze the index disk usage example for an example.
``_
@@ -4677,6 +4682,7 @@ def refresh(
For data streams, the API runs the refresh operation on the stream’s backing indices.
By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
You can change this default interval with the index.refresh_interval
setting.
+ In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices.
Refresh requests are synchronous and do not return a response until the refresh operation completes.
Refreshes are resource-intensive.
To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.
@@ -5076,6 +5082,7 @@ def resolve_index(
]
] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
) -> ObjectApiResponse[t.Any]:
"""
.. raw:: html
@@ -5103,6 +5110,10 @@ def resolve_index(
a missing or closed index.
:param mode: Filter indices by index mode - standard, lookup, time_series, etc.
Comma-separated list of IndexMode. Empty means no filter.
+ :param project_routing: Specifies a subset of projects to target using project
+ metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
+ the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
+ _alias:_origin _alias:*pr* Supported in serverless only.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
@@ -5125,6 +5136,8 @@ def resolve_index(
__query["mode"] = mode
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
__headers = {"accept": "application/json"}
return self.perform_request( # type: ignore[return-value]
"GET",
@@ -5556,7 +5569,9 @@ def shrink(
path_parts=__path_parts,
)
- @_rewrite_parameters()
+ @_rewrite_parameters(
+ body_name="index_template",
+ )
def simulate_index_template(
self,
*,
@@ -5567,6 +5582,8 @@ def simulate_index_template(
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
include_defaults: t.Optional[bool] = None,
+ index_template: t.Optional[t.Mapping[str, t.Any]] = None,
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
@@ -5586,12 +5603,19 @@ def simulate_index_template(
only be dry-run added if new or can also replace an existing one
:param include_defaults: If true, returns all relevant default configurations
for the index template.
+ :param index_template:
:param master_timeout: Period to wait for a connection to the master node. If
no response is received before the timeout expires, the request fails and
returns an error.
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
+ if index_template is None and body is None:
+ raise ValueError(
+ "Empty value passed for parameters 'index_template' and 'body', one of them should be set."
+ )
+ elif index_template is not None and body is not None:
+ raise ValueError("Cannot set both 'index_template' and 'body'")
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
__path = f'/_index_template/_simulate_index/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
@@ -5611,12 +5635,18 @@ def simulate_index_template(
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
+ __body = index_template if index_template is not None else body
+ if not __body:
+ __body = None
__headers = {"accept": "application/json"}
+ if __body is not None:
+ __headers["content-type"] = "application/json"
return self.perform_request( # type: ignore[return-value]
"POST",
__path,
params=__query,
headers=__headers,
+ body=__body,
endpoint_id="indices.simulate_index_template",
path_parts=__path_parts,
)
diff --git a/elasticsearch/_sync/client/inference.py b/elasticsearch/_sync/client/inference.py
index 7f34eba93..8ead6c39b 100644
--- a/elasticsearch/_sync/client/inference.py
+++ b/elasticsearch/_sync/client/inference.py
@@ -1239,6 +1239,103 @@ def put_cohere(
path_parts=__path_parts,
)
+ @_rewrite_parameters(
+ body_fields=(
+ "service",
+ "service_settings",
+ "chunking_settings",
+ "task_settings",
+ ),
+ )
+ def put_contextualai(
+ self,
+ *,
+ task_type: t.Union[str, t.Literal["rerank"]],
+ contextualai_inference_id: str,
+ service: t.Optional[t.Union[str, t.Literal["contextualai"]]] = None,
+ service_settings: t.Optional[t.Mapping[str, t.Any]] = None,
+ chunking_settings: t.Optional[t.Mapping[str, t.Any]] = None,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ pretty: t.Optional[bool] = None,
+ task_settings: t.Optional[t.Mapping[str, t.Any]] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ body: t.Optional[t.Dict[str, t.Any]] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Create an Contextual AI inference endpoint.
+ Create an inference endpoint to perform an inference task with the contexualai
service.
+ To review the available rerank
models, refer to https://docs.contextual.ai/api-reference/rerank/rerank#body-model.
+
+
+ ``_
+
+ :param task_type: The type of the inference task that the model will perform.
+ :param contextualai_inference_id: The unique identifier of the inference endpoint.
+ :param service: The type of service supported for the specified task type. In
+ this case, `contextualai`.
+ :param service_settings: Settings used to install the inference model. These
+ settings are specific to the `contextualai` service.
+ :param chunking_settings: The chunking configuration object.
+ :param task_settings: Settings to configure the inference task. These settings
+ are specific to the task type you specified.
+ :param timeout: Specifies the amount of time to wait for the inference endpoint
+ to be created.
+ """
+ if task_type in SKIP_IN_PATH:
+ raise ValueError("Empty value passed for parameter 'task_type'")
+ if contextualai_inference_id in SKIP_IN_PATH:
+ raise ValueError(
+ "Empty value passed for parameter 'contextualai_inference_id'"
+ )
+ if service is None and body is None:
+ raise ValueError("Empty value passed for parameter 'service'")
+ if service_settings is None and body is None:
+ raise ValueError("Empty value passed for parameter 'service_settings'")
+ __path_parts: t.Dict[str, str] = {
+ "task_type": _quote(task_type),
+ "contextualai_inference_id": _quote(contextualai_inference_id),
+ }
+ __path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["contextualai_inference_id"]}'
+ __query: t.Dict[str, t.Any] = {}
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if pretty is not None:
+ __query["pretty"] = pretty
+ if timeout is not None:
+ __query["timeout"] = timeout
+ if not __body:
+ if service is not None:
+ __body["service"] = service
+ if service_settings is not None:
+ __body["service_settings"] = service_settings
+ if chunking_settings is not None:
+ __body["chunking_settings"] = chunking_settings
+ if task_settings is not None:
+ __body["task_settings"] = task_settings
+ if not __body:
+ __body = None # type: ignore[assignment]
+ __headers = {"accept": "application/json"}
+ if __body is not None:
+ __headers["content-type"] = "application/json"
+ return self.perform_request( # type: ignore[return-value]
+ "PUT",
+ __path,
+ params=__query,
+ headers=__headers,
+ body=__body,
+ endpoint_id="inference.put_contextualai",
+ path_parts=__path_parts,
+ )
+
@_rewrite_parameters(
body_fields=(
"service",
@@ -2672,7 +2769,7 @@ def sparse_embedding(
)
@_rewrite_parameters(
- body_fields=("input", "task_settings"),
+ body_fields=("input", "input_type", "task_settings"),
)
def text_embedding(
self,
@@ -2682,6 +2779,7 @@ def text_embedding(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
+ input_type: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
task_settings: t.Optional[t.Any] = None,
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
@@ -2697,6 +2795,13 @@ def text_embedding(
:param inference_id: The inference Id
:param input: Inference input. Either a string or an array of strings.
+ :param input_type: The input data type for the text embedding model. Possible
+ values include: * `SEARCH` * `INGEST` * `CLASSIFICATION` * `CLUSTERING` Not
+ all services support all values. Unsupported values will trigger a validation
+ exception. Accepted values depend on the configured inference service, refer
+ to the relevant service-specific documentation for more info. > info > The
+ `input_type` parameter specified on the root level of the request body will
+ take precedence over the `input_type` parameter specified in `task_settings`.
:param task_settings: Optional task settings
:param timeout: Specifies the amount of time to wait for the inference request
to complete.
@@ -2722,6 +2827,8 @@ def text_embedding(
if not __body:
if input is not None:
__body["input"] = input
+ if input_type is not None:
+ __body["input_type"] = input_type
if task_settings is not None:
__body["task_settings"] = task_settings
if not __body:
diff --git a/elasticsearch/_sync/client/ingest.py b/elasticsearch/_sync/client/ingest.py
index 5fd38bd78..1286d3627 100644
--- a/elasticsearch/_sync/client/ingest.py
+++ b/elasticsearch/_sync/client/ingest.py
@@ -580,6 +580,7 @@ def put_ip_location_database(
body_fields=(
"deprecated",
"description",
+ "field_access_pattern",
"meta",
"on_failure",
"processors",
@@ -594,6 +595,9 @@ def put_pipeline(
deprecated: t.Optional[bool] = None,
description: t.Optional[str] = None,
error_trace: t.Optional[bool] = None,
+ field_access_pattern: t.Optional[
+ t.Union[str, t.Literal["classic", "flexible"]]
+ ] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
if_version: t.Optional[int] = None,
@@ -621,6 +625,8 @@ def put_pipeline(
or updating a non-deprecated index template, Elasticsearch will emit a deprecation
warning.
:param description: Description of the ingest pipeline.
+ :param field_access_pattern: Controls how processors in this pipeline should
+ read and write data on a document's source.
:param if_version: Required version for optimistic concurrency control for pipeline
updates
:param master_timeout: Period to wait for a connection to the master node. If
@@ -667,6 +673,8 @@ def put_pipeline(
__body["deprecated"] = deprecated
if description is not None:
__body["description"] = description
+ if field_access_pattern is not None:
+ __body["field_access_pattern"] = field_access_pattern
if meta is not None:
__body["_meta"] = meta
if on_failure is not None:
diff --git a/elasticsearch/_sync/client/license.py b/elasticsearch/_sync/client/license.py
index aca82098d..d352d114c 100644
--- a/elasticsearch/_sync/client/license.py
+++ b/elasticsearch/_sync/client/license.py
@@ -104,8 +104,10 @@ def get(
license types. If `false`, this parameter returns platinum for both platinum
and enterprise license types. This behavior is maintained for backwards compatibility.
This parameter is deprecated and will always be set to true in 8.x.
- :param local: Specifies whether to retrieve local information. The default value
- is `false`, which means the information is retrieved from the master node.
+ :param local: Specifies whether to retrieve local information. From 9.2 onwards
+ the default value is `true`, which means the information is retrieved from
+ the responding node. In earlier versions the default is `false`, which means
+ the information is retrieved from the elected master node.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_license"
diff --git a/elasticsearch/_sync/client/logstash.py b/elasticsearch/_sync/client/logstash.py
index f8abefa14..ae8e2a1dc 100644
--- a/elasticsearch/_sync/client/logstash.py
+++ b/elasticsearch/_sync/client/logstash.py
@@ -141,7 +141,9 @@ def put_pipeline(
``_
- :param id: An identifier for the pipeline.
+ :param id: An identifier for the pipeline. Pipeline IDs must begin with a letter
+ or underscore and contain only letters, underscores, dashes, hyphens and
+ numbers.
:param pipeline:
"""
if id in SKIP_IN_PATH:
diff --git a/elasticsearch/_sync/client/ml.py b/elasticsearch/_sync/client/ml.py
index 690197642..dd8f7f372 100644
--- a/elasticsearch/_sync/client/ml.py
+++ b/elasticsearch/_sync/client/ml.py
@@ -2390,7 +2390,7 @@ def get_overall_buckets(
exclude_interim: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- overall_score: t.Optional[t.Union[float, str]] = None,
+ overall_score: t.Optional[float] = None,
pretty: t.Optional[bool] = None,
start: t.Optional[t.Union[str, t.Any]] = None,
top_n: t.Optional[int] = None,
diff --git a/elasticsearch/_sync/client/nodes.py b/elasticsearch/_sync/client/nodes.py
index ef6c67b10..2c273bff3 100644
--- a/elasticsearch/_sync/client/nodes.py
+++ b/elasticsearch/_sync/client/nodes.py
@@ -368,9 +368,7 @@ def stats(
human: t.Optional[bool] = None,
include_segment_file_sizes: t.Optional[bool] = None,
include_unloaded_segments: t.Optional[bool] = None,
- level: t.Optional[
- t.Union[str, t.Literal["cluster", "indices", "shards"]]
- ] = None,
+ level: t.Optional[t.Union[str, t.Literal["indices", "node", "shards"]]] = None,
pretty: t.Optional[bool] = None,
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
types: t.Optional[t.Sequence[str]] = None,
diff --git a/elasticsearch/_sync/client/project.py b/elasticsearch/_sync/client/project.py
new file mode 100644
index 000000000..36a124acc
--- /dev/null
+++ b/elasticsearch/_sync/client/project.py
@@ -0,0 +1,68 @@
+# Licensed to Elasticsearch B.V. under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Elasticsearch B.V. licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+import typing as t
+
+from elastic_transport import ObjectApiResponse
+
+from ._base import NamespacedClient
+from .utils import (
+ Stability,
+ _rewrite_parameters,
+ _stability_warning,
+)
+
+
+class ProjectClient(NamespacedClient):
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ def tags(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ pretty: t.Optional[bool] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Return tags defined for the project
+
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_project/tags"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if pretty is not None:
+ __query["pretty"] = pretty
+ __headers = {"accept": "application/json"}
+ return self.perform_request( # type: ignore[return-value]
+ "GET",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="project.tags",
+ path_parts=__path_parts,
+ )
diff --git a/elasticsearch/_sync/client/security.py b/elasticsearch/_sync/client/security.py
index 2672a7951..c605f27e3 100644
--- a/elasticsearch/_sync/client/security.py
+++ b/elasticsearch/_sync/client/security.py
@@ -2052,6 +2052,45 @@ def get_settings(
path_parts=__path_parts,
)
+ @_rewrite_parameters()
+ def get_stats(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ pretty: t.Optional[bool] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Get security stats.
+ Gather security usage statistics from all node(s) within the cluster.
+
+
+ ``_
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_security/stats"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if pretty is not None:
+ __query["pretty"] = pretty
+ __headers = {"accept": "application/json"}
+ return self.perform_request( # type: ignore[return-value]
+ "GET",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="security.get_stats",
+ path_parts=__path_parts,
+ )
+
@_rewrite_parameters(
body_fields=(
"grant_type",
diff --git a/elasticsearch/_sync/client/shutdown.py b/elasticsearch/_sync/client/shutdown.py
index d7ec41511..28b360ca3 100644
--- a/elasticsearch/_sync/client/shutdown.py
+++ b/elasticsearch/_sync/client/shutdown.py
@@ -33,13 +33,9 @@ def delete_node(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- master_timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
- timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
) -> ObjectApiResponse[t.Any]:
"""
.. raw:: html
@@ -97,9 +93,7 @@ def get_node(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- master_timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
@@ -162,14 +156,10 @@ def put_node(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
- master_timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
target_node_name: t.Optional[str] = None,
- timeout: t.Optional[
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
- ] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
diff --git a/elasticsearch/_sync/client/sql.py b/elasticsearch/_sync/client/sql.py
index b2750ede1..bee0ba437 100644
--- a/elasticsearch/_sync/client/sql.py
+++ b/elasticsearch/_sync/client/sql.py
@@ -285,6 +285,7 @@ def query(
page_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
params: t.Optional[t.Sequence[t.Any]] = None,
pretty: t.Optional[bool] = None,
+ project_routing: t.Optional[str] = None,
query: t.Optional[str] = None,
request_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
@@ -332,6 +333,10 @@ def query(
is no longer available. Subsequent scroll requests prolong the lifetime of
the scroll cursor by the duration of `page_timeout` in the scroll request.
:param params: The values for parameters in the query.
+ :param project_routing: Specifies a subset of projects to target for the search
+ using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
+ queries: the _alias tag and a single value (possibly wildcarded). Examples:
+ _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
:param query: The SQL query to run.
:param request_timeout: The timeout before the request fails.
:param runtime_mappings: One or more runtime fields for the search request. These
@@ -357,6 +362,8 @@ def query(
__query["human"] = human
if pretty is not None:
__query["pretty"] = pretty
+ if project_routing is not None:
+ __query["project_routing"] = project_routing
if not __body:
if allow_partial_search_results is not None:
__body["allow_partial_search_results"] = allow_partial_search_results
diff --git a/elasticsearch/_sync/client/streams.py b/elasticsearch/_sync/client/streams.py
new file mode 100644
index 000000000..720f5f1e3
--- /dev/null
+++ b/elasticsearch/_sync/client/streams.py
@@ -0,0 +1,186 @@
+# Licensed to Elasticsearch B.V. under one or more contributor
+# license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright
+# ownership. Elasticsearch B.V. licenses this file to you under
+# the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import typing as t
+
+from elastic_transport import ObjectApiResponse, TextApiResponse
+
+from ._base import NamespacedClient
+from .utils import (
+ Stability,
+ _rewrite_parameters,
+ _stability_warning,
+)
+
+
+class StreamsClient(NamespacedClient):
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ def logs_disable(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ pretty: t.Optional[bool] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
+ """
+ .. raw:: html
+
+ Disable logs stream.
+ Turn off the logs stream feature for this cluster.
+
+
+ ``_
+
+ :param master_timeout: The period to wait for a connection to the master node.
+ If no response is received before the timeout expires, the request fails
+ and returns an error.
+ :param timeout: The period to wait for a response. If no response is received
+ before the timeout expires, the request fails and returns an error.
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_streams/logs/_disable"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if master_timeout is not None:
+ __query["master_timeout"] = master_timeout
+ if pretty is not None:
+ __query["pretty"] = pretty
+ if timeout is not None:
+ __query["timeout"] = timeout
+ __headers = {"accept": "application/json,text/plain"}
+ return self.perform_request( # type: ignore[return-value]
+ "POST",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="streams.logs_disable",
+ path_parts=__path_parts,
+ )
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ def logs_enable(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ pretty: t.Optional[bool] = None,
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
+ ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
+ """
+ .. raw:: html
+
+ Enable logs stream.
+ Turn on the logs stream feature for this cluster.
+ NOTE: To protect existing data, this feature can be turned on only if the
+ cluster does not have existing indices or data streams that match the pattern logs|logs.*
.
+ If those indices or data streams exist, a 409 - Conflict
response and error is returned.
+
+
+ ``_
+
+ :param master_timeout: The period to wait for a connection to the master node.
+ If no response is received before the timeout expires, the request fails
+ and returns an error.
+ :param timeout: The period to wait for a response. If no response is received
+ before the timeout expires, the request fails and returns an error.
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_streams/logs/_enable"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if master_timeout is not None:
+ __query["master_timeout"] = master_timeout
+ if pretty is not None:
+ __query["pretty"] = pretty
+ if timeout is not None:
+ __query["timeout"] = timeout
+ __headers = {"accept": "application/json,text/plain"}
+ return self.perform_request( # type: ignore[return-value]
+ "POST",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="streams.logs_enable",
+ path_parts=__path_parts,
+ )
+
+ @_rewrite_parameters()
+ @_stability_warning(Stability.EXPERIMENTAL)
+ def status(
+ self,
+ *,
+ error_trace: t.Optional[bool] = None,
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
+ human: t.Optional[bool] = None,
+ master_timeout: t.Optional[
+ t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
+ ] = None,
+ pretty: t.Optional[bool] = None,
+ ) -> ObjectApiResponse[t.Any]:
+ """
+ .. raw:: html
+
+ Get the status of streams.
+ Get the current status for all types of streams.
+
+
+ ``_
+
+ :param master_timeout: Period to wait for a connection to the master node. If
+ no response is received before the timeout expires, the request fails and
+ returns an error.
+ """
+ __path_parts: t.Dict[str, str] = {}
+ __path = "/_streams/status"
+ __query: t.Dict[str, t.Any] = {}
+ if error_trace is not None:
+ __query["error_trace"] = error_trace
+ if filter_path is not None:
+ __query["filter_path"] = filter_path
+ if human is not None:
+ __query["human"] = human
+ if master_timeout is not None:
+ __query["master_timeout"] = master_timeout
+ if pretty is not None:
+ __query["pretty"] = pretty
+ __headers = {"accept": "application/json"}
+ return self.perform_request( # type: ignore[return-value]
+ "GET",
+ __path,
+ params=__query,
+ headers=__headers,
+ endpoint_id="streams.status",
+ path_parts=__path_parts,
+ )
diff --git a/elasticsearch/_sync/client/watcher.py b/elasticsearch/_sync/client/watcher.py
index 9839cb80b..d14f8481d 100644
--- a/elasticsearch/_sync/client/watcher.py
+++ b/elasticsearch/_sync/client/watcher.py
@@ -552,11 +552,7 @@ def put_watch(
__body["transform"] = transform
if trigger is not None:
__body["trigger"] = trigger
- if not __body:
- __body = None # type: ignore[assignment]
- __headers = {"accept": "application/json"}
- if __body is not None:
- __headers["content-type"] = "application/json"
+ __headers = {"accept": "application/json", "content-type": "application/json"}
return self.perform_request( # type: ignore[return-value]
"PUT",
__path,
diff --git a/elasticsearch/dsl/aggs.py b/elasticsearch/dsl/aggs.py
index 802d6eca0..2a6b2ff91 100644
--- a/elasticsearch/dsl/aggs.py
+++ b/elasticsearch/dsl/aggs.py
@@ -653,6 +653,54 @@ def __init__(
)
+class CartesianBounds(Agg[_R]):
+ """
+ A metric aggregation that computes the spatial bounding box containing
+ all values for a Point or Shape field.
+
+ :arg field: The field on which to run the aggregation.
+ :arg missing: The value to apply to documents that do not have a
+ value. By default, documents without a value are ignored.
+ :arg script:
+ """
+
+ name = "cartesian_bounds"
+
+ def __init__(
+ self,
+ *,
+ field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
+ missing: Union[str, int, float, bool, "DefaultType"] = DEFAULT,
+ script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
+ **kwargs: Any,
+ ):
+ super().__init__(field=field, missing=missing, script=script, **kwargs)
+
+
+class CartesianCentroid(Agg[_R]):
+ """
+ A metric aggregation that computes the weighted centroid from all
+ coordinate values for point and shape fields.
+
+ :arg field: The field on which to run the aggregation.
+ :arg missing: The value to apply to documents that do not have a
+ value. By default, documents without a value are ignored.
+ :arg script:
+ """
+
+ name = "cartesian_centroid"
+
+ def __init__(
+ self,
+ *,
+ field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
+ missing: Union[str, int, float, bool, "DefaultType"] = DEFAULT,
+ script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
+ **kwargs: Any,
+ ):
+ super().__init__(field=field, missing=missing, script=script, **kwargs)
+
+
class CategorizeText(Bucket[_R]):
"""
A multi-bucket aggregation that groups semi-structured text into
@@ -735,6 +783,43 @@ def __init__(
)
+class ChangePoint(Pipeline[_R]):
+ """
+ A sibling pipeline that detects, spikes, dips, and change points in a
+ metric. Given a distribution of values provided by the sibling multi-
+ bucket aggregation, this aggregation indicates the bucket of any spike
+ or dip and/or the bucket at which the largest change in the
+ distribution of values, if they are statistically significant. There
+ must be at least 22 bucketed values. Fewer than 1,000 is preferred.
+
+ :arg format: `DecimalFormat` pattern for the output value. If
+ specified, the formatted value is returned in the aggregation’s
+ `value_as_string` property.
+ :arg gap_policy: Policy to apply when gaps are found in the data.
+ Defaults to `skip` if omitted.
+ :arg buckets_path: Path to the buckets that contain one set of values
+ to correlate.
+ """
+
+ name = "change_point"
+
+ def __init__(
+ self,
+ *,
+ format: Union[str, "DefaultType"] = DEFAULT,
+ gap_policy: Union[
+ Literal["skip", "insert_zeros", "keep_values"], "DefaultType"
+ ] = DEFAULT,
+ buckets_path: Union[
+ str, Sequence[str], Mapping[str, str], "DefaultType"
+ ] = DEFAULT,
+ **kwargs: Any,
+ ):
+ super().__init__(
+ format=format, gap_policy=gap_policy, buckets_path=buckets_path, **kwargs
+ )
+
+
class Children(Bucket[_R]):
"""
A single bucket aggregation that selects child documents that have the
@@ -2980,6 +3065,14 @@ class SignificantTerms(Bucket[_R]):
the foreground sample with a term divided by the number of
documents in the background with the term.
:arg script_heuristic: Customized score, implemented via a script.
+ :arg p_value: Significant terms heuristic that calculates the p-value
+ between the term existing in foreground and background sets. The
+ p-value is the probability of obtaining test results at least as
+ extreme as the results actually observed, under the assumption
+ that the null hypothesis is correct. The p-value is calculated
+ assuming that the foreground set and the background set are
+ independent https://en.wikipedia.org/wiki/Bernoulli_trial, with
+ the null hypothesis that the probabilities are the same.
:arg shard_min_doc_count: Regulates the certainty a shard has if the
term should actually be added to the candidate list or not with
respect to the `min_doc_count`. Terms will only be considered if
@@ -3033,6 +3126,9 @@ def __init__(
script_heuristic: Union[
"types.ScriptedHeuristic", Dict[str, Any], "DefaultType"
] = DEFAULT,
+ p_value: Union[
+ "types.PValueHeuristic", Dict[str, Any], "DefaultType"
+ ] = DEFAULT,
shard_min_doc_count: Union[int, "DefaultType"] = DEFAULT,
shard_size: Union[int, "DefaultType"] = DEFAULT,
size: Union[int, "DefaultType"] = DEFAULT,
@@ -3051,6 +3147,7 @@ def __init__(
mutual_information=mutual_information,
percentage=percentage,
script_heuristic=script_heuristic,
+ p_value=p_value,
shard_min_doc_count=shard_min_doc_count,
shard_size=shard_size,
size=size,
diff --git a/elasticsearch/dsl/field.py b/elasticsearch/dsl/field.py
index f7314e441..3b5075287 100644
--- a/elasticsearch/dsl/field.py
+++ b/elasticsearch/dsl/field.py
@@ -3874,9 +3874,13 @@ class SemanticText(Field):
sent in the inference endpoint associated with inference_id. If
chunking settings are updated, they will not be applied to
existing documents until they are reindexed.
+ :arg fields:
"""
name = "semantic_text"
+ _param_defs = {
+ "fields": {"type": "field", "hash": True},
+ }
def __init__(
self,
@@ -3888,8 +3892,9 @@ def __init__(
"types.SemanticTextIndexOptions", Dict[str, Any], "DefaultType"
] = DEFAULT,
chunking_settings: Union[
- "types.ChunkingSettings", Dict[str, Any], "DefaultType"
+ "types.ChunkingSettings", None, Dict[str, Any], "DefaultType"
] = DEFAULT,
+ fields: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
**kwargs: Any,
):
if meta is not DEFAULT:
@@ -3902,6 +3907,8 @@ def __init__(
kwargs["index_options"] = index_options
if chunking_settings is not DEFAULT:
kwargs["chunking_settings"] = chunking_settings
+ if fields is not DEFAULT:
+ kwargs["fields"] = fields
super().__init__(*args, **kwargs)
diff --git a/elasticsearch/dsl/query.py b/elasticsearch/dsl/query.py
index 0a2cef032..27536c64e 100644
--- a/elasticsearch/dsl/query.py
+++ b/elasticsearch/dsl/query.py
@@ -1433,7 +1433,7 @@ def __init__(
] = DEFAULT,
version: Union[int, "DefaultType"] = DEFAULT,
version_type: Union[
- Literal["internal", "external", "external_gte", "force"], "DefaultType"
+ Literal["internal", "external", "external_gte"], "DefaultType"
] = DEFAULT,
boost: Union[float, "DefaultType"] = DEFAULT,
_name: Union[str, "DefaultType"] = DEFAULT,
diff --git a/elasticsearch/dsl/response/__init__.py b/elasticsearch/dsl/response/__init__.py
index 712cda27b..b58464e16 100644
--- a/elasticsearch/dsl/response/__init__.py
+++ b/elasticsearch/dsl/response/__init__.py
@@ -233,10 +233,13 @@ def search_after(self) -> "SearchBase[_R]":
"types.SimpleValueAggregate",
"types.DerivativeAggregate",
"types.BucketMetricValueAggregate",
+ "types.ChangePointAggregate",
"types.StatsAggregate",
"types.StatsBucketAggregate",
"types.ExtendedStatsAggregate",
"types.ExtendedStatsBucketAggregate",
+ "types.CartesianBoundsAggregate",
+ "types.CartesianCentroidAggregate",
"types.GeoBoundsAggregate",
"types.GeoCentroidAggregate",
"types.HistogramAggregate",
diff --git a/elasticsearch/dsl/types.py b/elasticsearch/dsl/types.py
index 146ad125b..b62fad025 100644
--- a/elasticsearch/dsl/types.py
+++ b/elasticsearch/dsl/types.py
@@ -398,14 +398,17 @@ class DenseVectorIndexOptions(AttrDict[Any]):
HNSW graph. Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`,
and `int4_hnsw` index types. Defaults to `16` if omitted.
:arg rescore_vector: The rescore vector options. This is only
- applicable to `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`,
- `int4_flat`, and `int8_flat` index types.
+ applicable to `bbq_disk`, `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`,
+ `bbq_flat`, `int4_flat`, and `int8_flat` index types.
+ :arg on_disk_rescore: `true` if vector rescoring should be done on-
+ disk Only applicable to `bbq_hnsw`
"""
type: Union[
Literal[
"bbq_flat",
"bbq_hnsw",
+ "bbq_disk",
"flat",
"hnsw",
"int4_flat",
@@ -421,6 +424,7 @@ class DenseVectorIndexOptions(AttrDict[Any]):
rescore_vector: Union[
"DenseVectorIndexOptionsRescoreVector", Dict[str, Any], DefaultType
]
+ on_disk_rescore: Union[bool, DefaultType]
def __init__(
self,
@@ -429,6 +433,7 @@ def __init__(
Literal[
"bbq_flat",
"bbq_hnsw",
+ "bbq_disk",
"flat",
"hnsw",
"int4_flat",
@@ -444,6 +449,7 @@ def __init__(
rescore_vector: Union[
"DenseVectorIndexOptionsRescoreVector", Dict[str, Any], DefaultType
] = DEFAULT,
+ on_disk_rescore: Union[bool, DefaultType] = DEFAULT,
**kwargs: Any,
):
if type is not DEFAULT:
@@ -456,6 +462,8 @@ def __init__(
kwargs["m"] = m
if rescore_vector is not DEFAULT:
kwargs["rescore_vector"] = rescore_vector
+ if on_disk_rescore is not DEFAULT:
+ kwargs["on_disk_rescore"] = on_disk_rescore
super().__init__(kwargs)
@@ -2327,9 +2335,7 @@ class LikeDocument(AttrDict[Any]):
per_field_analyzer: Union[Mapping[Union[str, InstrumentedField], str], DefaultType]
routing: Union[str, DefaultType]
version: Union[int, DefaultType]
- version_type: Union[
- Literal["internal", "external", "external_gte", "force"], DefaultType
- ]
+ version_type: Union[Literal["internal", "external", "external_gte"], DefaultType]
def __init__(
self,
@@ -2344,7 +2350,7 @@ def __init__(
routing: Union[str, DefaultType] = DEFAULT,
version: Union[int, DefaultType] = DEFAULT,
version_type: Union[
- Literal["internal", "external", "external_gte", "force"], DefaultType
+ Literal["internal", "external", "external_gte"], DefaultType
] = DEFAULT,
**kwargs: Any,
):
@@ -2775,6 +2781,31 @@ def __init__(
super().__init__(kwargs)
+class PValueHeuristic(AttrDict[Any]):
+ """
+ :arg background_is_superset:
+ :arg normalize_above: Should the results be normalized when above the
+ given value. Allows for consistent significance results at various
+ scales. Note: `0` is a special value which means no normalization
+ """
+
+ background_is_superset: Union[bool, DefaultType]
+ normalize_above: Union[int, DefaultType]
+
+ def __init__(
+ self,
+ *,
+ background_is_superset: Union[bool, DefaultType] = DEFAULT,
+ normalize_above: Union[int, DefaultType] = DEFAULT,
+ **kwargs: Any,
+ ):
+ if background_is_superset is not DEFAULT:
+ kwargs["background_is_superset"] = background_is_superset
+ if normalize_above is not DEFAULT:
+ kwargs["normalize_above"] = normalize_above
+ super().__init__(kwargs)
+
+
class PercentageScoreHeuristic(AttrDict[Any]):
pass
@@ -3168,9 +3199,11 @@ def __init__(
class SemanticTextIndexOptions(AttrDict[Any]):
"""
:arg dense_vector:
+ :arg sparse_vector:
"""
dense_vector: Union["DenseVectorIndexOptions", Dict[str, Any], DefaultType]
+ sparse_vector: Union["SparseVectorIndexOptions", Dict[str, Any], DefaultType]
def __init__(
self,
@@ -3178,10 +3211,15 @@ def __init__(
dense_vector: Union[
"DenseVectorIndexOptions", Dict[str, Any], DefaultType
] = DEFAULT,
+ sparse_vector: Union[
+ "SparseVectorIndexOptions", Dict[str, Any], DefaultType
+ ] = DEFAULT,
**kwargs: Any,
):
if dense_vector is not DEFAULT:
kwargs["dense_vector"] = dense_vector
+ if sparse_vector is not DEFAULT:
+ kwargs["sparse_vector"] = sparse_vector
super().__init__(kwargs)
@@ -4030,24 +4068,25 @@ def __init__(
class TextEmbedding(AttrDict[Any]):
"""
- :arg model_id: (required)
:arg model_text: (required)
+ :arg model_id: Model ID is required for all dense_vector fields but
+ may be inferred for semantic_text fields
"""
- model_id: Union[str, DefaultType]
model_text: Union[str, DefaultType]
+ model_id: Union[str, DefaultType]
def __init__(
self,
*,
- model_id: Union[str, DefaultType] = DEFAULT,
model_text: Union[str, DefaultType] = DEFAULT,
+ model_id: Union[str, DefaultType] = DEFAULT,
**kwargs: Any,
):
- if model_id is not DEFAULT:
- kwargs["model_id"] = model_id
if model_text is not DEFAULT:
kwargs["model_text"] = model_text
+ if model_id is not DEFAULT:
+ kwargs["model_id"] = model_id
super().__init__(kwargs)
@@ -4680,6 +4719,82 @@ class CardinalityAggregate(AttrDict[Any]):
meta: Mapping[str, Any]
+class CartesianBoundsAggregate(AttrDict[Any]):
+ """
+ :arg bounds:
+ :arg meta:
+ """
+
+ bounds: "TopLeftBottomRightGeoBounds"
+ meta: Mapping[str, Any]
+
+
+class CartesianCentroidAggregate(AttrDict[Any]):
+ """
+ :arg count: (required)
+ :arg location:
+ :arg meta:
+ """
+
+ count: int
+ location: "CartesianPoint"
+ meta: Mapping[str, Any]
+
+
+class CartesianPoint(AttrDict[Any]):
+ """
+ :arg x: (required)
+ :arg y: (required)
+ """
+
+ x: float
+ y: float
+
+
+class ChangePointAggregate(AttrDict[Any]):
+ """
+ :arg type: (required)
+ :arg bucket:
+ :arg meta:
+ """
+
+ type: "ChangeType"
+ bucket: "ChangePointBucket"
+ meta: Mapping[str, Any]
+
+
+class ChangePointBucket(AttrDict[Any]):
+ """
+ :arg key: (required)
+ :arg doc_count: (required)
+ """
+
+ key: Union[int, float, str, bool, None]
+ doc_count: int
+
+
+class ChangeType(AttrDict[Any]):
+ """
+ :arg dip:
+ :arg distribution_change:
+ :arg indeterminable:
+ :arg non_stationary:
+ :arg spike:
+ :arg stationary:
+ :arg step_change:
+ :arg trend_change:
+ """
+
+ dip: "Dip"
+ distribution_change: "DistributionChange"
+ indeterminable: "Indeterminable"
+ non_stationary: "NonStationary"
+ spike: "Spike"
+ stationary: "Stationary"
+ step_change: "StepChange"
+ trend_change: "TrendChange"
+
+
class ChildrenAggregate(AttrDict[Any]):
"""
:arg doc_count: (required)
@@ -4957,6 +5072,26 @@ class DfsStatisticsProfile(AttrDict[Any]):
children: Sequence["DfsStatisticsProfile"]
+class Dip(AttrDict[Any]):
+ """
+ :arg p_value: (required)
+ :arg change_point: (required)
+ """
+
+ p_value: float
+ change_point: int
+
+
+class DistributionChange(AttrDict[Any]):
+ """
+ :arg p_value: (required)
+ :arg change_point: (required)
+ """
+
+ p_value: float
+ change_point: int
+
+
class DoubleTermsAggregate(AttrDict[Any]):
"""
Result of a `terms` aggregation when the field is some kind of decimal
@@ -5518,6 +5653,14 @@ class HitsMetadata(AttrDict[Any]):
max_score: Union[float, None]
+class Indeterminable(AttrDict[Any]):
+ """
+ :arg reason: (required)
+ """
+
+ reason: str
+
+
class InferenceAggregate(AttrDict[Any]):
"""
:arg value:
@@ -5920,6 +6063,18 @@ class NestedIdentity(AttrDict[Any]):
_nested: "NestedIdentity"
+class NonStationary(AttrDict[Any]):
+ """
+ :arg p_value: (required)
+ :arg r_value: (required)
+ :arg trend: (required)
+ """
+
+ p_value: float
+ r_value: float
+ trend: str
+
+
class ParentAggregate(AttrDict[Any]):
"""
:arg doc_count: (required)
@@ -6277,6 +6432,16 @@ class SimpleValueAggregate(AttrDict[Any]):
meta: Mapping[str, Any]
+class Spike(AttrDict[Any]):
+ """
+ :arg p_value: (required)
+ :arg change_point: (required)
+ """
+
+ p_value: float
+ change_point: int
+
+
class StandardDeviationBounds(AttrDict[Any]):
"""
:arg upper: (required)
@@ -6313,6 +6478,10 @@ class StandardDeviationBoundsAsString(AttrDict[Any]):
lower_sampling: str
+class Stationary(AttrDict[Any]):
+ pass
+
+
class StatsAggregate(AttrDict[Any]):
"""
Statistics aggregation result. `min`, `max` and `avg` are missing if
@@ -6368,6 +6537,16 @@ class StatsBucketAggregate(AttrDict[Any]):
meta: Mapping[str, Any]
+class StepChange(AttrDict[Any]):
+ """
+ :arg p_value: (required)
+ :arg change_point: (required)
+ """
+
+ p_value: float
+ change_point: int
+
+
class StringRareTermsAggregate(AttrDict[Any]):
"""
Result of the `rare_terms` aggregation when the field is a string.
@@ -6599,6 +6778,18 @@ class TotalHits(AttrDict[Any]):
value: int
+class TrendChange(AttrDict[Any]):
+ """
+ :arg p_value: (required)
+ :arg r_value: (required)
+ :arg change_point: (required)
+ """
+
+ p_value: float
+ r_value: float
+ change_point: int
+
+
class UnmappedRareTermsAggregate(AttrDict[Any]):
"""
Result of a `rare_terms` aggregation when the field is unmapped.