20
20
#
21
21
module Elasticsearch
22
22
module API
23
- module Rollup
23
+ module Indices
24
24
module Actions
25
- # Rollup an index
25
+ # Downsample an index
26
26
# This functionality is Experimental and may be changed or removed
27
27
# completely in a future release. Elastic will take a best effort approach
28
28
# to fix any issues, but experimental features are not subject to the
29
29
# support SLA of official GA features.
30
30
#
31
- # @option arguments [String] :index The index to roll up (*Required*)
32
- # @option arguments [String] :rollup_index The name of the rollup index to create (*Required*)
31
+ # @option arguments [String] :index The index to downsample (*Required*)
32
+ # @option arguments [String] :target_index The name of the target index to store downsampled data (*Required*)
33
33
# @option arguments [Hash] :headers Custom HTTP headers
34
- # @option arguments [Hash] :body The rollup configuration (*Required*)
34
+ # @option arguments [Hash] :body The downsampling configuration (*Required*)
35
35
#
36
36
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html
37
37
#
38
- def rollup ( arguments = { } )
38
+ def downsample ( arguments = { } )
39
39
raise ArgumentError , "Required argument 'body' missing" unless arguments [ :body ]
40
40
raise ArgumentError , "Required argument 'index' missing" unless arguments [ :index ]
41
- raise ArgumentError , "Required argument 'rollup_index ' missing" unless arguments [ :rollup_index ]
41
+ raise ArgumentError , "Required argument 'target_index ' missing" unless arguments [ :target_index ]
42
42
43
43
arguments = arguments . clone
44
44
headers = arguments . delete ( :headers ) || { }
@@ -47,10 +47,10 @@ def rollup(arguments = {})
47
47
48
48
_index = arguments . delete ( :index )
49
49
50
- _rollup_index = arguments . delete ( :rollup_index )
50
+ _target_index = arguments . delete ( :target_index )
51
51
52
52
method = Elasticsearch ::API ::HTTP_POST
53
- path = "#{ Utils . __listify ( _index ) } /_rollup /#{ Utils . __listify ( _rollup_index ) } "
53
+ path = "#{ Utils . __listify ( _index ) } /_downsample /#{ Utils . __listify ( _target_index ) } "
54
54
params = { }
55
55
56
56
Elasticsearch ::API ::Response . new (
0 commit comments