@@ -2806,97 +2806,6 @@ async def get_migrate_reindex_status(
28062806 )
28072807
28082808 @_rewrite_parameters ()
2809- < << << << HEAD
2810- == == == =
2811- @_availability_warning (Stability .EXPERIMENTAL )
2812- async def get_sample (
2813- self ,
2814- * ,
2815- index : str ,
2816- error_trace : t .Optional [bool ] = None ,
2817- filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
2818- human : t .Optional [bool ] = None ,
2819- pretty : t .Optional [bool ] = None ,
2820- ) -> ObjectApiResponse [t .Any ]:
2821- """
2822- .. raw:: html
2823-
2824- <p>Request for a random sample of raw documents ingested into the given index or data stream.</p>
2825-
2826-
2827- `<https://www.elastic.co/docs/api/doc/elasticsearch/group/ingest-random-sampling>`_
2828-
2829- :param index: Single index or data stream name. Wildcards are not supported.
2830- """
2831- if index in SKIP_IN_PATH :
2832- raise ValueError ("Empty value passed for parameter 'index'" )
2833- __path_parts : t .Dict [str , str ] = {"index" : _quote (index )}
2834- __path = f'/{ __path_parts ["index" ]} /_sample'
2835- __query : t .Dict [str , t .Any ] = {}
2836- if error_trace is not None :
2837- __query ["error_trace" ] = error_trace
2838- if filter_path is not None :
2839- __query ["filter_path" ] = filter_path
2840- if human is not None :
2841- __query ["human" ] = human
2842- if pretty is not None :
2843- __query ["pretty" ] = pretty
2844- __headers = {"accept" : "application/json" }
2845- return await self .perform_request ( # type: ignore[return-value]
2846- "GET" ,
2847- __path ,
2848- params = __query ,
2849- headers = __headers ,
2850- endpoint_id = "indices.get_sample" ,
2851- path_parts = __path_parts ,
2852- )
2853-
2854- @_rewrite_parameters ()
2855- @_availability_warning (Stability .EXPERIMENTAL )
2856- async def get_sample_stats (
2857- self ,
2858- * ,
2859- index : str ,
2860- error_trace : t .Optional [bool ] = None ,
2861- filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
2862- human : t .Optional [bool ] = None ,
2863- pretty : t .Optional [bool ] = None ,
2864- ) -> ObjectApiResponse [t .Any ]:
2865- """
2866- .. raw:: html
2867-
2868- <p>Request stats for a random sample of raw documents ingested into the given index or data stream.</p>
2869-
2870-
2871- `<https://www.elastic.co/docs/api/doc/elasticsearch/group/ingest-random-sampling>`_
2872-
2873- :param index: Single index or data stream name. Wildcards are not supported.
2874- """
2875- if index in SKIP_IN_PATH :
2876- raise ValueError ("Empty value passed for parameter 'index'" )
2877- __path_parts : t .Dict [str , str ] = {"index" : _quote (index )}
2878- __path = f'/{ __path_parts ["index" ]} /_sample/stats'
2879- __query : t .Dict [str , t .Any ] = {}
2880- if error_trace is not None :
2881- __query ["error_trace" ] = error_trace
2882- if filter_path is not None :
2883- __query ["filter_path" ] = filter_path
2884- if human is not None :
2885- __query ["human" ] = human
2886- if pretty is not None :
2887- __query ["pretty" ] = pretty
2888- __headers = {"accept" : "application/json" }
2889- return await self .perform_request ( # type: ignore[return-value]
2890- "GET" ,
2891- __path ,
2892- params = __query ,
2893- headers = __headers ,
2894- endpoint_id = "indices.get_sample_stats" ,
2895- path_parts = __path_parts ,
2896- )
2897-
2898- @_rewrite_parameters ()
2899- >> >> >> > bbca81a6 (Add warnings for private APIs (#3212))
29002809 async def get_settings (
29012810 self ,
29022811 * ,
0 commit comments