Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
env:
PYTHON_VERSION: "{{ matrix.python }}"
TEST_SUITE: "platinum"
STACK_VERSION: "9.1.0-SNAPSHOT"
STACK_VERSION: "9.2.0-SNAPSHOT"
PYTHON_CONNECTION_CLASS: "{{ matrix.connection }}"
NOX_SESSION: "{{ matrix.nox_session }}"
matrix:
Expand Down
126 changes: 82 additions & 44 deletions elasticsearch/_async/client/__init__.py

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions elasticsearch/_async/client/async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
517 changes: 491 additions & 26 deletions elasticsearch/_async/client/cat.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions elasticsearch/_async/client/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def delete(

:param connector_id: The unique identifier of the connector to be deleted
:param delete_sync_jobs: A flag indicating if associated sync jobs should be
also removed. Defaults to false.
also removed.
:param hard: A flag indicating if the connector should be hard deleted.
"""
if connector_id in SKIP_IN_PATH:
Expand Down Expand Up @@ -360,7 +360,7 @@ async def list(

:param connector_name: A comma-separated list of connector names to fetch connector
documents for
:param from_: Starting offset (default: 0)
:param from_: Starting offset
:param include_deleted: A flag to indicate if the desired connector should be
fetched, even if it was soft-deleted.
:param index_name: A comma-separated list of connector index names to fetch connector
Expand Down Expand Up @@ -955,7 +955,7 @@ async def sync_job_list(
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list>`_

:param connector_id: A connector id to fetch connector sync jobs for
:param from_: Starting offset (default: 0)
:param from_: Starting offset
:param job_type: A comma-separated list of job types to fetch the sync jobs for
:param size: Specifies a max number of results to get
:param status: A sync job status to fetch connector sync jobs for
Expand Down
7 changes: 7 additions & 0 deletions elasticsearch/_async/client/eql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
29 changes: 26 additions & 3 deletions elasticsearch/_async/client/esql.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class EsqlClient(NamespacedClient):
"columnar",
"filter",
"include_ccs_metadata",
"include_execution_metadata",
"keep_alive",
"keep_on_completion",
"locale",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -486,6 +494,7 @@ async def list_queries(
"columnar",
"filter",
"include_ccs_metadata",
"include_execution_metadata",
"locale",
"params",
"profile",
Expand Down Expand Up @@ -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[
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions elasticsearch/_async/client/fleet.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,11 +642,7 @@ async def search(
__body["track_total_hits"] = track_total_hits
if version is not None:
__body["version"] = version
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]
"POST",
__path,
Expand Down
6 changes: 1 addition & 5 deletions elasticsearch/_async/client/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@ async def explore(
__body["query"] = query
if vertices is not None:
__body["vertices"] = vertices
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]
"POST",
__path,
Expand Down
12 changes: 2 additions & 10 deletions elasticsearch/_async/client/ilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,7 @@ async def move_to_step(
__body["current_step"] = current_step
if next_step is not None:
__body["next_step"] = next_step
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]
"POST",
__path,
Expand Down Expand Up @@ -453,11 +449,7 @@ async def put_lifecycle(
if not __body:
if policy is not None:
__body["policy"] = policy
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,
Expand Down
Loading