Skip to content

Commit ed32823

Browse files
committed
[API] Updates
Updates source code docs Adds ignore_unavailable, allow_no_indices, ignore_throttled, :expand_wildcards to ml.put_job
1 parent 3b4ef5b commit ed32823

File tree

6 files changed

+35
-5
lines changed

6 files changed

+35
-5
lines changed

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/indices/freeze.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ module Actions
3131
# @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns.
3232
# @option arguments [Hash] :headers Custom HTTP headers
3333
#
34+
# *Deprecation notice*:
35+
# Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release.
36+
# Deprecated since version 7.14.0
37+
#
38+
#
3439
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/freeze-index-api.html
3540
#
3641
def freeze(arguments = {})

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/indices/unfreeze.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ module Actions
3131
# @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns.
3232
# @option arguments [Hash] :headers Custom HTTP headers
3333
#
34+
# *Deprecation notice*:
35+
# Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release.
36+
# Deprecated since version 7.14.0
37+
#
38+
#
3439
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/unfreeze-index-api.html
3540
#
3641
def unfreeze(arguments = {})

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ module Actions
2323
# Instantiates an anomaly detection job.
2424
#
2525
# @option arguments [String] :job_id The ID of the job to create
26+
# @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false). Only set if datafeed_config is provided.
27+
# @option arguments [Boolean] :allow_no_indices Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided.
28+
# @option arguments [Boolean] :ignore_throttled Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.
29+
# @option arguments [String] :expand_wildcards Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided. (options: open, closed, hidden, none, all)
2630
# @option arguments [Hash] :headers Custom HTTP headers
2731
# @option arguments [Hash] :body The job (*Required*)
2832
#
@@ -40,11 +44,22 @@ def put_job(arguments = {})
4044

4145
method = Elasticsearch::API::HTTP_PUT
4246
path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}"
43-
params = {}
47+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
48+
ParamsRegistry.get(__method__)
4449

4550
body = arguments[:body]
4651
perform_request(method, path, params, body, headers).body
4752
end
53+
54+
# Register this action with its valid params when the module is loaded.
55+
#
56+
# @since 6.2.0
57+
ParamsRegistry.register(:put_job, [
58+
:ignore_unavailable,
59+
:allow_no_indices,
60+
:ignore_throttled,
61+
:expand_wildcards
62+
].freeze)
4863
end
4964
end
5065
end

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/rollup/rollup.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ module API
2121
module Rollup
2222
module Actions
2323
# Rollup an index
24+
# This functionality is Experimental and may be changed or removed
25+
# completely in a future release. Elastic will take a best effort approach
26+
# to fix any issues, but experimental features are not subject to the
27+
# support SLA of official GA features.
2428
#
2529
# @option arguments [String] :index The index to roll up (*Required*)
2630
# @option arguments [String] :rollup_index The name of the rollup index to create (*Required*)
2731
# @option arguments [Hash] :headers Custom HTTP headers
2832
# @option arguments [Hash] :body The rollup configuration (*Required*)
2933
#
30-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/rollup-api.html
34+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/xpack-rollup.html
3135
#
3236
def rollup(arguments = {})
3337
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/sql/query.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module Actions
2626
# @option arguments [Hash] :headers Custom HTTP headers
2727
# @option arguments [Hash] :body Use the `query` element to start a query. Use the `cursor` element to continue a query. (*Required*)
2828
#
29-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-rest-overview.html
29+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-search-api.html
3030
#
3131
def query(arguments = {})
3232
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
@@ -37,7 +37,8 @@ def query(arguments = {})
3737

3838
method = Elasticsearch::API::HTTP_POST
3939
path = "_sql"
40-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
40+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments,
41+
ParamsRegistry.get(__method__)
4142

4243
body = arguments[:body]
4344
perform_request(method, path, params, body, headers).body

elasticsearch-xpack/lib/elasticsearch/xpack/api/actions/sql/translate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module Actions
2525
# @option arguments [Hash] :headers Custom HTTP headers
2626
# @option arguments [Hash] :body Specify the query in the `query` element. (*Required*)
2727
#
28-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-translate.html
28+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/sql-translate-api.html
2929
#
3030
def translate(arguments = {})
3131
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

0 commit comments

Comments
 (0)