@@ -1972,3 +1972,40 @@ async def update_by_query(self, index, body=None, params=None, headers=None):
1972
1972
headers = headers ,
1973
1973
body = body ,
1974
1974
)
1975
+
1976
+ @query_params ()
1977
+ async def close_point_in_time (self , body = None , params = None , headers = None ):
1978
+ """
1979
+ Close a point in time
1980
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time.html>`_
1981
+
1982
+ :arg body: a point-in-time id to close
1983
+ """
1984
+ return await self .transport .perform_request (
1985
+ "DELETE" , "/_pit" , params = params , headers = headers , body = body
1986
+ )
1987
+
1988
+ @query_params (
1989
+ "expand_wildcards" , "ignore_unavailable" , "keep_alive" , "preference" , "routing"
1990
+ )
1991
+ async def open_point_in_time (self , index = None , params = None , headers = None ):
1992
+ """
1993
+ Open a point in time that can be used in subsequent searches
1994
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time.html>`_
1995
+
1996
+ :arg index: A comma-separated list of index names to open point
1997
+ in time; use `_all` or empty string to perform the operation on all
1998
+ indices
1999
+ :arg expand_wildcards: Whether to expand wildcard expression to
2000
+ concrete indices that are open, closed or both. Valid choices: open,
2001
+ closed, hidden, none, all Default: open
2002
+ :arg ignore_unavailable: Whether specified concrete indices
2003
+ should be ignored when unavailable (missing or closed)
2004
+ :arg keep_alive: Specific the time to live for the point in time
2005
+ :arg preference: Specify the node or shard the operation should
2006
+ be performed on (default: random)
2007
+ :arg routing: Specific routing value
2008
+ """
2009
+ return await self .transport .perform_request (
2010
+ "POST" , _make_path (index , "_pit" ), params = params , headers = headers
2011
+ )
0 commit comments