Skip to content

Auto-generated code for main #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 6, 2024
Merged
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
104 changes: 73 additions & 31 deletions elasticsearch_serverless/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ async def clear_scroll(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Clears the search context and results for a scrolling search.
Clear a scrolling search. Clear the search context and results for a scrolling
search.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-scroll-api.html>`_

Expand Down Expand Up @@ -621,7 +622,11 @@ async def close_point_in_time(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Closes a point-in-time.
Close a point in time. A point in time must be opened explicitly before being
used in search requests. The `keep_alive` parameter tells Elasticsearch how long
it should persist. A point in time is automatically closed when the `keep_alive`
period has elapsed. However, keeping points in time has a cost; close them as
soon as they are no longer required for search requests.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html>`_

Expand Down Expand Up @@ -1624,10 +1629,11 @@ async def field_caps(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
The field capabilities API returns the information about the capabilities of
fields among multiple indices. The field capabilities API returns runtime fields
like any other field. For example, a runtime field with a type of keyword is
returned as any other field that belongs to the `keyword` family.
Get the field capabilities. Get information about the capabilities of fields
among multiple indices. For data streams, the API returns field capabilities
among the stream’s backing indices. It returns runtime fields like any other
field. For example, a runtime field with a type of keyword is returned the same
as any other field that belongs to the `keyword` family.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html>`_

Expand Down Expand Up @@ -2163,7 +2169,10 @@ async def mget(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Allows to get multiple documents in one request.
Get multiple documents. Get multiple JSON documents by ID from one or more indices.
If you specify an index in the request URI, you only need to specify the document
IDs in the request body. To ensure fast responses, this multi get (mget) API
responds with partial results if one or more shards fail.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html>`_

Expand Down Expand Up @@ -2284,7 +2293,13 @@ async def msearch(
typed_keys: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Allows to execute several search operations in one request.
Run multiple searches. The format of the request is similar to the bulk API format
and makes use of the newline delimited JSON (NDJSON) format. The structure is
as follows: ``` header\\n body\\n header\\n body\\n ``` This structure is specifically
optimized to reduce parsing if a specific search ends up redirected to another
node. IMPORTANT: The final line of data must end with a newline character `\\n`.
Each newline character may be preceded by a carriage return `\\r`. When sending
requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html>`_

Expand Down Expand Up @@ -2416,7 +2431,7 @@ async def msearch_template(
typed_keys: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Runs multiple templated searches with a single request.
Run multiple templated searches.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html>`_

Expand Down Expand Up @@ -2511,7 +2526,11 @@ async def mtermvectors(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns multiple termvectors in one request.
Get multiple term vectors. You can specify existing documents by index and ID
or provide artificial documents in the body of the request. You can specify the
index in the request body or request URI. The response contains a `docs` array
with all the fetched termvectors. Each element has the structure provided by
the termvectors API.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html>`_

Expand Down Expand Up @@ -2622,13 +2641,15 @@ async def open_point_in_time(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
A search request by default executes against the most recent visible data of
the target indices, which is called point in time. Elasticsearch pit (point in
time) is a lightweight view into the state of the data as it existed when initiated.
In some cases, it’s preferred to perform multiple search requests using the same
point in time. For example, if refreshes happen between `search_after` requests,
then the results of those requests might not be consistent as changes happening
between searches are only visible to the more recent point in time.
Open a point in time. A search request by default runs against the most recent
visible data of the target indices, which is called point in time. Elasticsearch
pit (point in time) is a lightweight view into the state of the data as it existed
when initiated. In some cases, it’s preferred to perform multiple search requests
using the same point in time. For example, if refreshes happen between `search_after`
requests, then the results of those requests might not be consistent as changes
happening between searches are only visible to the more recent point in time.
A point in time must be opened explicitly before being used in search requests.
The `keep_alive` parameter tells Elasticsearch how long it should persist.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html>`_

Expand Down Expand Up @@ -2795,8 +2816,8 @@ async def rank_eval(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Enables you to evaluate the quality of ranked search results over a set of typical
search queries.
Evaluate ranked search results. Evaluate the quality of ranked search results
over a set of typical search queries.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html>`_

Expand Down Expand Up @@ -2994,7 +3015,7 @@ async def render_search_template(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Renders a search template as a search request body.
Render a search template. Render a search template as a search request body.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/render-search-template-api.html>`_

Expand Down Expand Up @@ -3120,7 +3141,22 @@ async def scroll(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Allows to retrieve a large numbers of results from a single search request.
Run a scrolling search. IMPORTANT: The scroll API is no longer recommend for
deep pagination. If you need to preserve the index state while paging through
more than 10,000 hits, use the `search_after` parameter with a point in time
(PIT). The scroll API gets large sets of results from a single scrolling search
request. To get the necessary scroll ID, submit a search API request that includes
an argument for the `scroll` query parameter. The `scroll` parameter indicates
how long Elasticsearch should retain the search context for the request. The
search response returns a scroll ID in the `_scroll_id` response body parameter.
You can then use the scroll ID with the scroll API to retrieve the next batch
of results for the request. If the Elasticsearch security features are enabled,
the access to the results of a specific scroll ID is restricted to the user or
API key that submitted the search. You can also use the scroll API to specify
a new scroll parameter that extends or shortens the retention period for the
search context. IMPORTANT: Results from a scrolling search reflect the state
of the index at the time of the initial search request. Subsequent indexing or
document changes only affect later search and scroll requests.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll>`_

Expand Down Expand Up @@ -3310,9 +3346,9 @@ async def search(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns search hits that match the query defined in the request. You can provide
search queries using the `q` query string parameter or the request body. If both
are specified, only the query parameter is used.
Run a search. Get search hits that match the query defined in the request. You
can provide search queries using the `q` query string parameter or the request
body. If both are specified, only the query parameter is used.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html>`_

Expand Down Expand Up @@ -3742,7 +3778,7 @@ async def search_mvt(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> BinaryApiResponse:
"""
Search a vector tile. Searches a vector tile for geospatial values.
Search a vector tile. Search a vector tile for geospatial values.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html>`_

Expand Down Expand Up @@ -3912,7 +3948,7 @@ async def search_template(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Runs a search with a search template.
Run a search with a search template.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html>`_

Expand Down Expand Up @@ -4044,9 +4080,15 @@ async def terms_enum(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
The terms enum API can be used to discover terms in the index that begin with
the provided string. It is designed for low-latency look-ups used in auto-complete
scenarios.
Get terms in an index. Discover terms that match a partial string in an index.
This "terms enum" API is designed for low-latency look-ups used in auto-complete
scenarios. If the `complete` property in the response is false, the returned
terms set may be incomplete and should be treated as approximate. This can occur
due to a few reasons, such as a request timeout or a node error. NOTE: The terms
enum API may return terms from deleted documents. Deleted documents are initially
only marked as deleted. It is not until their segments are merged that documents
are actually deleted. Until that happens, the terms enum API will return terms
from these documents.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-terms-enum.html>`_

Expand Down Expand Up @@ -4144,8 +4186,8 @@ async def termvectors(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get term vector information. Returns information and statistics about terms in
the fields of a particular document.
Get term vector information. Get information and statistics about terms in the
fields of a particular document.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html>`_

Expand Down
42 changes: 21 additions & 21 deletions elasticsearch_serverless/_async/client/async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ async def delete(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Deletes an async search by identifier. If the search is still running, the search
request will be cancelled. Otherwise, the saved search results are deleted. If
the Elasticsearch security features are enabled, the deletion of a specific async
search is restricted to: the authenticated user that submitted the original search
request; users that have the `cancel_task` cluster privilege.
Delete an async search. If the asynchronous search is still running, it is cancelled.
Otherwise, the saved search results are deleted. If the Elasticsearch security
features are enabled, the deletion of a specific async search is restricted to:
the authenticated user that submitted the original search request; users that
have the `cancel_task` cluster privilege.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_

Expand Down Expand Up @@ -85,9 +85,9 @@ async def get(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Retrieves the results of a previously submitted async search request given its
identifier. If the Elasticsearch security features are enabled, access to the
results of a specific async search is restricted to the user or API key that
Get async search results. Retrieve the results of a previously submitted asynchronous
search request. If the Elasticsearch security features are enabled, access to
the results of a specific async search is restricted to the user or API key that
submitted it.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
Expand Down Expand Up @@ -148,10 +148,10 @@ async def status(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get async search status Retrieves the status of a previously submitted async
search request given its identifier, without retrieving search results. If the
Elasticsearch security features are enabled, use of this API is restricted to
the `monitoring_user` role.
Get the async search status. Get the status of a previously submitted async search
request given its identifier, without retrieving search results. If the Elasticsearch
security features are enabled, use of this API is restricted to the `monitoring_user`
role.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_

Expand Down Expand Up @@ -323,15 +323,15 @@ async def submit(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Runs a search request asynchronously. When the primary sort of the results is
an indexed field, shards get sorted based on minimum and maximum value that they
hold for that field, hence partial results become available following the sort
criteria that was requested. Warning: Async search does not support scroll nor
search requests that only include the suggest section. By default, Elasticsearch
doesn’t allow you to store an async search response larger than 10Mb and an attempt
to do this results in an error. The maximum allowed size for a stored async search
response can be set by changing the `search.max_async_search_response_size` cluster
level setting.
Run an async search. When the primary sort of the results is an indexed field,
shards get sorted based on minimum and maximum value that they hold for that
field. Partial results become available following the sort criteria that was
requested. Warning: Asynchronous search does not support scroll or search requests
that include only the suggest section. By default, Elasticsearch does not allow
you to store an async search response larger than 10Mb and an attempt to do this
results in an error. The maximum allowed size for a stored async search response
can be set by changing the `search.max_async_search_response_size` cluster level
setting.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_

Expand Down
Loading
Loading