Skip to content

Commit 631a6d2

Browse files
committed
[7.x] Generate new API type stubs
1 parent c8d0a71 commit 631a6d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+13931
-48
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ async def bulk(self, body, index=None, doc_type=None, params=None, headers=None)
461461
async def clear_scroll(self, body=None, scroll_id=None, params=None, headers=None):
462462
"""
463463
Explicitly clears the search context for a scroll.
464-
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-request-body.html#_clear_scroll_api>`_
464+
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/clear-scroll-api.html>`_
465465
466466
:arg body: A comma-separated list of scroll IDs to clear if none
467467
was specified via the scroll_id parameter
@@ -2039,3 +2039,40 @@ async def get_script_languages(self, params=None, headers=None):
20392039
return await self.transport.perform_request(
20402040
"GET", "/_script_language", params=params, headers=headers
20412041
)
2042+
2043+
@query_params()
2044+
async def close_point_in_time(self, body=None, params=None, headers=None):
2045+
"""
2046+
Close a point in time
2047+
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/point-in-time-api.html>`_
2048+
2049+
:arg body: a point-in-time id to close
2050+
"""
2051+
return await self.transport.perform_request(
2052+
"DELETE", "/_pit", params=params, headers=headers, body=body
2053+
)
2054+
2055+
@query_params(
2056+
"expand_wildcards", "ignore_unavailable", "keep_alive", "preference", "routing"
2057+
)
2058+
async def open_point_in_time(self, index=None, params=None, headers=None):
2059+
"""
2060+
Open a point in time that can be used in subsequent searches
2061+
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/point-in-time-api.html>`_
2062+
2063+
:arg index: A comma-separated list of index names to open point
2064+
in time; use `_all` or empty string to perform the operation on all
2065+
indices
2066+
:arg expand_wildcards: Whether to expand wildcard expression to
2067+
concrete indices that are open, closed or both. Valid choices: open,
2068+
closed, hidden, none, all Default: open
2069+
:arg ignore_unavailable: Whether specified concrete indices
2070+
should be ignored when unavailable (missing or closed)
2071+
:arg keep_alive: Specific the time to live for the point in time
2072+
:arg preference: Specify the node or shard the operation should
2073+
be performed on (default: random)
2074+
:arg routing: Specific routing value
2075+
"""
2076+
return await self.transport.perform_request(
2077+
"POST", _make_path(index, "_pit"), params=params, headers=headers
2078+
)

0 commit comments

Comments
 (0)