elasticsearch-serverless 0.1.0.20231031.pre → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +13 -2
- data/lib/elasticsearch-serverless/api/async_search/get.rb +19 -4
- data/lib/elasticsearch-serverless/api/async_search/status.rb +12 -2
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +20 -5
- data/lib/elasticsearch-serverless/api/bulk.rb +19 -5
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +24 -6
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +25 -6
- data/lib/elasticsearch-serverless/api/cat/count.rb +27 -7
- data/lib/elasticsearch-serverless/api/cat/help.rb +16 -6
- data/lib/elasticsearch-serverless/api/cat/indices.rb +34 -7
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +27 -7
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +35 -7
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +35 -7
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +28 -7
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +30 -8
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +13 -4
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +4 -2
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +16 -4
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +18 -5
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +17 -5
- data/lib/elasticsearch-serverless/api/cluster/info.rb +11 -2
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +28 -4
- data/lib/elasticsearch-serverless/api/connector/check_in.rb +65 -0
- data/lib/elasticsearch-serverless/api/connector/delete.rb +66 -0
- data/lib/elasticsearch-serverless/api/connector/get.rb +65 -0
- data/lib/elasticsearch-serverless/api/connector/list.rb +60 -0
- data/lib/elasticsearch-serverless/api/connector/post.rb +55 -0
- data/lib/elasticsearch-serverless/api/connector/put.rb +68 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +66 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +66 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +66 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +59 -0
- data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +57 -0
- data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +65 -0
- data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_error.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_name.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_native.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +67 -0
- data/lib/elasticsearch-serverless/api/connector/update_status.rb +67 -0
- data/lib/elasticsearch-serverless/api/count.rb +30 -10
- data/lib/elasticsearch-serverless/api/create.rb +23 -8
- data/lib/elasticsearch-serverless/api/delete.rb +18 -6
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +39 -12
- data/lib/elasticsearch-serverless/api/delete_script.rb +15 -4
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +10 -1
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +9 -1
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +13 -3
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +11 -2
- data/lib/elasticsearch-serverless/api/enrich/stats.rb +5 -2
- data/lib/elasticsearch-serverless/api/eql/delete.rb +14 -3
- data/lib/elasticsearch-serverless/api/eql/get.rb +14 -4
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +10 -2
- data/lib/elasticsearch-serverless/api/eql/search.rb +9 -1
- data/lib/elasticsearch-serverless/api/esql/query.rb +57 -0
- data/lib/elasticsearch-serverless/api/exists.rb +20 -6
- data/lib/elasticsearch-serverless/api/exists_source.rb +17 -5
- data/lib/elasticsearch-serverless/api/explain.rb +17 -5
- data/lib/elasticsearch-serverless/api/field_caps.rb +16 -3
- data/lib/elasticsearch-serverless/api/get.rb +18 -4
- data/lib/elasticsearch-serverless/api/get_script.rb +11 -2
- data/lib/elasticsearch-serverless/api/get_source.rb +10 -1
- data/lib/elasticsearch-serverless/api/graph/explore.rb +13 -3
- data/lib/elasticsearch-serverless/api/index.rb +27 -7
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +13 -3
- data/lib/elasticsearch-serverless/api/indices/create.rb +17 -5
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +18 -3
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +16 -4
- data/lib/elasticsearch-serverless/api/indices/delete.rb +26 -8
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +19 -6
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +13 -2
- data/lib/elasticsearch-serverless/api/indices/exists.rb +17 -4
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +19 -5
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +9 -1
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/get.rb +20 -5
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +23 -6
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +17 -4
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +15 -4
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +11 -2
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +23 -6
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +28 -7
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +20 -2
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +5 -2
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +21 -6
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +22 -6
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +14 -2
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +23 -6
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +29 -7
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +71 -0
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +21 -5
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +17 -4
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +20 -7
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +13 -6
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +14 -4
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +9 -4
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +24 -7
- data/lib/elasticsearch-serverless/api/inference/delete.rb +74 -0
- data/lib/elasticsearch-serverless/api/inference/get.rb +72 -0
- data/lib/elasticsearch-serverless/api/inference/inference.rb +74 -0
- data/lib/elasticsearch-serverless/api/inference/put.rb +74 -0
- data/lib/elasticsearch-serverless/api/info.rb +4 -1
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +16 -5
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +16 -4
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +6 -2
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +11 -2
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +12 -3
- data/lib/elasticsearch-serverless/api/license/get.rb +8 -3
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +10 -2
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +10 -2
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +18 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +16 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +23 -5
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +13 -2
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +7 -2
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +8 -2
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +27 -6
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +27 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +21 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +26 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +28 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +10 -1
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +21 -3
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +27 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +46 -7
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +29 -8
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +19 -4
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +71 -0
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +17 -2
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +21 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +14 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +25 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +11 -1
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +15 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +28 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +12 -3
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +12 -2
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +19 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +25 -3
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +35 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +26 -6
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +25 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +21 -3
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +16 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +13 -3
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +26 -5
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +10 -2
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +9 -1
- data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +68 -0
- data/lib/elasticsearch-serverless/api/mget.rb +17 -3
- data/lib/elasticsearch-serverless/api/msearch.rb +15 -1
- data/lib/elasticsearch-serverless/api/msearch_template.rb +17 -5
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +14 -8
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +20 -4
- data/lib/elasticsearch-serverless/api/ping.rb +4 -1
- data/lib/elasticsearch-serverless/api/put_script.rb +19 -6
- data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +65 -0
- data/lib/elasticsearch-serverless/api/{query_ruleset/delete.rb → query_rules/delete_ruleset.rb} +11 -7
- data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +65 -0
- data/lib/elasticsearch-serverless/api/{query_ruleset/get.rb → query_rules/get_ruleset.rb} +12 -8
- data/lib/elasticsearch-serverless/api/{query_ruleset/list.rb → query_rules/list_rulesets.rb} +6 -8
- data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +67 -0
- data/lib/elasticsearch-serverless/api/{query_ruleset/put.rb → query_rules/put_ruleset.rb} +11 -7
- data/lib/elasticsearch-serverless/api/rank_eval.rb +12 -3
- data/lib/elasticsearch-serverless/api/reindex.rb +11 -7
- data/lib/elasticsearch-serverless/api/render_search_template.rb +12 -3
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +5 -2
- data/lib/elasticsearch-serverless/api/scroll.rb +9 -1
- data/lib/elasticsearch-serverless/api/search.rb +110 -30
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/get.rb +10 -2
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
- data/lib/elasticsearch-serverless/api/search_application/put.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +9 -1
- data/lib/elasticsearch-serverless/api/search_application/search.rb +12 -3
- data/lib/elasticsearch-serverless/api/search_mvt.rb +27 -7
- data/lib/elasticsearch-serverless/api/search_template.rb +23 -7
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +8 -2
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +7 -1
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +23 -7
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +10 -1
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +10 -1
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +9 -3
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +75 -0
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +3 -1
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +9 -1
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +15 -4
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +9 -1
- data/lib/elasticsearch-serverless/api/sql/query.rb +3 -1
- data/lib/elasticsearch-serverless/api/sql/translate.rb +3 -1
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +3 -1
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +10 -2
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -1
- data/lib/elasticsearch-serverless/api/tasks/get.rb +67 -0
- data/lib/elasticsearch-serverless/api/terms_enum.rb +9 -1
- data/lib/elasticsearch-serverless/api/termvectors.rb +21 -9
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +15 -4
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +23 -4
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +20 -3
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +18 -4
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +34 -4
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +17 -4
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +15 -2
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +24 -2
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +23 -6
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +20 -3
- data/lib/elasticsearch-serverless/api/update.rb +23 -7
- data/lib/elasticsearch-serverless/api/update_by_query.rb +38 -11
- data/lib/elasticsearch-serverless/api.rb +9 -6
- data/lib/elasticsearch-serverless/version.rb +3 -3
- data/lib/elasticsearch-serverless.rb +16 -7
- metadata +46 -65
@@ -21,16 +21,19 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
+
# Get term vector information.
|
24
25
|
# Returns information and statistics about terms in the fields of a particular document.
|
25
26
|
#
|
26
27
|
# @option arguments [String] :index Name of the index that contains the document. (*Required*)
|
27
28
|
# @option arguments [String] :id Unique identifier of the document.
|
28
|
-
# @option arguments [String, Array<String>] :fields Comma-separated list or wildcard expressions of fields to include in the statistics.
|
29
|
+
# @option arguments [String, Array<String>] :fields Comma-separated list or wildcard expressions of fields to include in the statistics.
|
30
|
+
# Used as the default list unless a specific field list is provided in the +completion_fields+ or +fielddata_fields+ parameters.
|
29
31
|
# @option arguments [Boolean] :field_statistics If +true+, the response includes the document count, sum of document frequencies, and sum of total term frequencies. Server default: true.
|
30
32
|
# @option arguments [Boolean] :offsets If +true+, the response includes term offsets. Server default: true.
|
31
33
|
# @option arguments [Boolean] :payloads If +true+, the response includes term payloads. Server default: true.
|
32
34
|
# @option arguments [Boolean] :positions If +true+, the response includes term positions. Server default: true.
|
33
|
-
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
|
35
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
|
36
|
+
# Random by default.
|
34
37
|
# @option arguments [Boolean] :realtime If true, the request is real-time as opposed to near-real-time. Server default: true.
|
35
38
|
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
36
39
|
# @option arguments [Boolean] :term_statistics If +true+, the response includes term frequency and document frequency.
|
@@ -42,6 +45,14 @@ module ElasticsearchServerless
|
|
42
45
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
|
43
46
|
#
|
44
47
|
def termvectors(arguments = {})
|
48
|
+
request_opts = { endpoint: arguments[:endpoint] || "termvectors" }
|
49
|
+
|
50
|
+
defined_params = [:index, :id].inject({}) do |set_variables, variable|
|
51
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
52
|
+
set_variables
|
53
|
+
end
|
54
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
55
|
+
|
45
56
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
46
57
|
|
47
58
|
arguments = arguments.clone
|
@@ -59,22 +70,23 @@ module ElasticsearchServerless
|
|
59
70
|
ElasticsearchServerless::API::HTTP_GET
|
60
71
|
end
|
61
72
|
|
62
|
-
|
63
|
-
path
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
73
|
+
arguments.delete(:endpoint)
|
74
|
+
path = if _index && _id
|
75
|
+
"#{Utils.listify(_index)}/_termvectors/#{Utils.listify(_id)}"
|
76
|
+
else
|
77
|
+
"#{Utils.listify(_index)}/_termvectors"
|
78
|
+
end
|
68
79
|
params = Utils.process_params(arguments)
|
69
80
|
|
70
81
|
ElasticsearchServerless::API::Response.new(
|
71
|
-
perform_request(method, path, params, body, headers)
|
82
|
+
perform_request(method, path, params, body, headers, request_opts)
|
72
83
|
)
|
73
84
|
end
|
74
85
|
|
75
86
|
# Deprecated: Use the plural version, {#termvectors}
|
76
87
|
#
|
77
88
|
def termvector(arguments = {})
|
89
|
+
warn "[DEPRECATION] `termvector` is deprecated. Please use the plural version, `termvectors` instead."
|
78
90
|
termvectors(arguments.merge endpoint: '_termvector')
|
79
91
|
end
|
80
92
|
end
|
@@ -22,17 +22,28 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Delete a transform.
|
26
|
+
# Deletes a transform.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
|
-
# @option arguments [Boolean] :force If this value is false, the transform must be stopped before it can be deleted. If true, the transform is
|
29
|
-
#
|
29
|
+
# @option arguments [Boolean] :force If this value is false, the transform must be stopped before it can be deleted. If true, the transform is
|
30
|
+
# deleted regardless of its current state.
|
31
|
+
# @option arguments [Boolean] :delete_dest_index If this value is true, the destination index is deleted together with the transform. If false, the destination
|
32
|
+
# index will not be deleted
|
30
33
|
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
31
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
35
|
#
|
33
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html
|
34
37
|
#
|
35
38
|
def delete_transform(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.delete_transform" }
|
40
|
+
|
41
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
42
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
+
set_variables
|
44
|
+
end
|
45
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
|
+
|
36
47
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
37
48
|
|
38
49
|
arguments = arguments.clone
|
@@ -47,7 +58,7 @@ module ElasticsearchServerless
|
|
47
58
|
params = Utils.process_params(arguments)
|
48
59
|
|
49
60
|
ElasticsearchServerless::API::Response.new(
|
50
|
-
perform_request(method, path, params, body, headers)
|
61
|
+
perform_request(method, path, params, body, headers, request_opts)
|
51
62
|
)
|
52
63
|
end
|
53
64
|
end
|
@@ -22,18 +22,37 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
+
# Get transforms.
|
25
26
|
# Retrieves configuration information for transforms.
|
26
27
|
#
|
27
|
-
# @option arguments [String, Array<String>] :transform_id Identifier for the transform. It can be a transform identifier or a
|
28
|
-
#
|
28
|
+
# @option arguments [String, Array<String>] :transform_id Identifier for the transform. It can be a transform identifier or a
|
29
|
+
# wildcard expression. You can get information for all transforms by using
|
30
|
+
# +_all+, by specifying +*+ as the +<transform_id>+, or by omitting the
|
31
|
+
# +<transform_id>+.
|
32
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
33
|
+
# - Contains wildcard expressions and there are no transforms that match.
|
34
|
+
# - Contains the _all string or no identifiers and there are no matches.
|
35
|
+
# - Contains wildcard expressions and there are only partial matches.
|
36
|
+
# If this parameter is false, the request returns a 404 status code when
|
37
|
+
# there are no matches or only partial matches. Server default: true.
|
29
38
|
# @option arguments [Integer] :from Skips the specified number of transforms. Server default: 0.
|
30
39
|
# @option arguments [Integer] :size Specifies the maximum number of transforms to obtain. Server default: 100.
|
31
|
-
# @option arguments [Boolean] :exclude_generated Excludes fields that were automatically added when creating the
|
40
|
+
# @option arguments [Boolean] :exclude_generated Excludes fields that were automatically added when creating the
|
41
|
+
# transform. This allows the configuration to be in an acceptable format to
|
42
|
+
# be retrieved and then added to another cluster.
|
32
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
44
|
#
|
34
45
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html
|
35
46
|
#
|
36
47
|
def get_transform(arguments = {})
|
48
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.get_transform" }
|
49
|
+
|
50
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
51
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
52
|
+
set_variables
|
53
|
+
end
|
54
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
55
|
+
|
37
56
|
arguments = arguments.clone
|
38
57
|
headers = arguments.delete(:headers) || {}
|
39
58
|
|
@@ -50,7 +69,7 @@ module ElasticsearchServerless
|
|
50
69
|
params = Utils.process_params(arguments)
|
51
70
|
|
52
71
|
ElasticsearchServerless::API::Response.new(
|
53
|
-
perform_request(method, path, params, body, headers)
|
72
|
+
perform_request(method, path, params, body, headers, request_opts)
|
54
73
|
)
|
55
74
|
end
|
56
75
|
end
|
@@ -22,10 +22,19 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
+
# Get transform stats.
|
25
26
|
# Retrieves usage information for transforms.
|
26
27
|
#
|
27
|
-
# @option arguments [String, Array<String>] :transform_id Identifier for the transform. It can be a transform identifier or a
|
28
|
-
#
|
28
|
+
# @option arguments [String, Array<String>] :transform_id Identifier for the transform. It can be a transform identifier or a
|
29
|
+
# wildcard expression. You can get information for all transforms by using
|
30
|
+
# +_all+, by specifying +*+ as the +<transform_id>+, or by omitting the
|
31
|
+
# +<transform_id>+. (*Required*)
|
32
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request:
|
33
|
+
# - Contains wildcard expressions and there are no transforms that match.
|
34
|
+
# - Contains the _all string or no identifiers and there are no matches.
|
35
|
+
# - Contains wildcard expressions and there are only partial matches.
|
36
|
+
# If this parameter is false, the request returns a 404 status code when
|
37
|
+
# there are no matches or only partial matches. Server default: true.
|
29
38
|
# @option arguments [Integer] :from Skips the specified number of transforms. Server default: 0.
|
30
39
|
# @option arguments [Integer] :size Specifies the maximum number of transforms to obtain. Server default: 100.
|
31
40
|
# @option arguments [Time] :timeout Controls the time to wait for the stats
|
@@ -34,6 +43,14 @@ module ElasticsearchServerless
|
|
34
43
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html
|
35
44
|
#
|
36
45
|
def get_transform_stats(arguments = {})
|
46
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.get_transform_stats" }
|
47
|
+
|
48
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
49
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
50
|
+
set_variables
|
51
|
+
end
|
52
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
53
|
+
|
37
54
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
38
55
|
|
39
56
|
arguments = arguments.clone
|
@@ -48,7 +65,7 @@ module ElasticsearchServerless
|
|
48
65
|
params = Utils.process_params(arguments)
|
49
66
|
|
50
67
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
69
|
)
|
53
70
|
end
|
54
71
|
end
|
@@ -22,16 +22,30 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Preview a transform.
|
26
|
+
# Generates a preview of the results that you will get when you create a transform with the same configuration.
|
27
|
+
# It returns a maximum of 100 results. The calculations are based on all the current data in the source index. It also
|
28
|
+
# generates a list of mappings and settings for the destination index. These values are determined based on the field
|
29
|
+
# types of the source index and the transform aggregations.
|
26
30
|
#
|
27
|
-
# @option arguments [String] :transform_id Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform
|
28
|
-
#
|
31
|
+
# @option arguments [String] :transform_id Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform
|
32
|
+
# configuration details in the request body.
|
33
|
+
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the
|
34
|
+
# timeout expires, the request fails and returns an error. Server default: 30s.
|
29
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
36
|
# @option arguments [Hash] :body request body
|
31
37
|
#
|
32
38
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html
|
33
39
|
#
|
34
40
|
def preview_transform(arguments = {})
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.preview_transform" }
|
42
|
+
|
43
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
44
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
45
|
+
set_variables
|
46
|
+
end
|
47
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
48
|
+
|
35
49
|
arguments = arguments.clone
|
36
50
|
headers = arguments.delete(:headers) || {}
|
37
51
|
|
@@ -53,7 +67,7 @@ module ElasticsearchServerless
|
|
53
67
|
params = Utils.process_params(arguments)
|
54
68
|
|
55
69
|
ElasticsearchServerless::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
70
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
71
|
)
|
58
72
|
end
|
59
73
|
end
|
@@ -22,10 +22,32 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Create a transform.
|
26
|
+
# Creates a transform.
|
27
|
+
# A transform copies data from source indices, transforms it, and persists it into an entity-centric destination index. You can also think of the destination index as a two-dimensional tabular data structure (known as
|
28
|
+
# a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a
|
29
|
+
# unique row per entity.
|
30
|
+
# You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If
|
31
|
+
# you choose to use the pivot method for your transform, the entities are defined by the set of +group_by+ fields in
|
32
|
+
# the pivot object. If you choose to use the latest method, the entities are defined by the +unique_key+ field values
|
33
|
+
# in the latest object.
|
34
|
+
# You must have +create_index+, +index+, and +read+ privileges on the destination index and +read+ and
|
35
|
+
# +view_index_metadata+ privileges on the source indices. When Elasticsearch security features are enabled, the
|
36
|
+
# transform remembers which roles the user that created it had at the time of creation and uses those same roles. If
|
37
|
+
# those roles do not have the required privileges on the source and destination indices, the transform fails when it
|
38
|
+
# attempts unauthorized operations.
|
39
|
+
# NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any
|
40
|
+
# +.transform-internal*+ indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do
|
41
|
+
# not give users any privileges on +.transform-internal*+ indices. If you used transforms prior to 7.5, also do not
|
42
|
+
# give users any privileges on +.data-frame-internal*+ indices.
|
26
43
|
#
|
27
|
-
# @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),
|
28
|
-
#
|
44
|
+
# @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),
|
45
|
+
# hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. (*Required*)
|
46
|
+
# @option arguments [Boolean] :defer_validation When the transform is created, a series of validations occur to ensure its success. For example, there is a
|
47
|
+
# check for the existence of the source indices and a check that the destination index is not part of the source
|
48
|
+
# index pattern. You can use this parameter to skip the checks, for example when the source index does not exist
|
49
|
+
# until after the transform is created. The validations are always run when you start the transform, however, with
|
50
|
+
# the exception of privilege checks.
|
29
51
|
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
52
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
53
|
# @option arguments [Hash] :body request body
|
@@ -33,6 +55,14 @@ module ElasticsearchServerless
|
|
33
55
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html
|
34
56
|
#
|
35
57
|
def put_transform(arguments = {})
|
58
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.put_transform" }
|
59
|
+
|
60
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
61
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
62
|
+
set_variables
|
63
|
+
end
|
64
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
65
|
+
|
36
66
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
67
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
38
68
|
|
@@ -48,7 +78,7 @@ module ElasticsearchServerless
|
|
48
78
|
params = Utils.process_params(arguments)
|
49
79
|
|
50
80
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
81
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
82
|
)
|
53
83
|
end
|
54
84
|
end
|
@@ -22,15 +22,28 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Reset a transform.
|
26
|
+
# Resets a transform.
|
27
|
+
# Before you can reset it, you must stop it; alternatively, use the +force+ query parameter.
|
28
|
+
# If the destination index was created by the transform, it is deleted.
|
26
29
|
#
|
27
|
-
# @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),
|
28
|
-
#
|
30
|
+
# @option arguments [String] :transform_id Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),
|
31
|
+
# hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. (*Required*)
|
32
|
+
# @option arguments [Boolean] :force If this value is +true+, the transform is reset regardless of its current state. If it's +false+, the transform
|
33
|
+
# must be stopped before it can be reset.
|
29
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
35
|
#
|
31
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html
|
32
37
|
#
|
33
38
|
def reset_transform(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.reset_transform" }
|
40
|
+
|
41
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
42
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
+
set_variables
|
44
|
+
end
|
45
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
|
+
|
34
47
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
35
48
|
|
36
49
|
arguments = arguments.clone
|
@@ -45,7 +58,7 @@ module ElasticsearchServerless
|
|
45
58
|
params = Utils.process_params(arguments)
|
46
59
|
|
47
60
|
ElasticsearchServerless::API::Response.new(
|
48
|
-
perform_request(method, path, params, body, headers)
|
61
|
+
perform_request(method, path, params, body, headers, request_opts)
|
49
62
|
)
|
50
63
|
end
|
51
64
|
end
|
@@ -22,7 +22,12 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Schedule a transform to start now.
|
26
|
+
# Instantly runs a transform to process data.
|
27
|
+
# If you _schedule_now a transform, it will process the new data instantly,
|
28
|
+
# without waiting for the configured frequency interval. After _schedule_now API is called,
|
29
|
+
# the transform will be processed again at now + frequency unless _schedule_now API
|
30
|
+
# is called again in the meantime.
|
26
31
|
#
|
27
32
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
33
|
# @option arguments [Time] :timeout Controls the time to wait for the scheduling to take place Server default: 30s.
|
@@ -31,6 +36,14 @@ module ElasticsearchServerless
|
|
31
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html
|
32
37
|
#
|
33
38
|
def schedule_now_transform(arguments = {})
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.schedule_now_transform" }
|
40
|
+
|
41
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
42
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
+
set_variables
|
44
|
+
end
|
45
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
|
+
|
34
47
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
35
48
|
|
36
49
|
arguments = arguments.clone
|
@@ -45,7 +58,7 @@ module ElasticsearchServerless
|
|
45
58
|
params = Utils.process_params(arguments)
|
46
59
|
|
47
60
|
ElasticsearchServerless::API::Response.new(
|
48
|
-
perform_request(method, path, params, body, headers)
|
61
|
+
perform_request(method, path, params, body, headers, request_opts)
|
49
62
|
)
|
50
63
|
end
|
51
64
|
end
|
@@ -22,7 +22,21 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Start a transform.
|
26
|
+
# Starts a transform.
|
27
|
+
# When you start a transform, it creates the destination index if it does not already exist. The +number_of_shards+ is
|
28
|
+
# set to +1+ and the +auto_expand_replicas+ is set to +0-1+. If it is a pivot transform, it deduces the mapping
|
29
|
+
# definitions for the destination index from the source indices and the transform aggregations. If fields in the
|
30
|
+
# destination index are derived from scripts (as in the case of +scripted_metric+ or +bucket_script+ aggregations),
|
31
|
+
# the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce
|
32
|
+
# mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you
|
33
|
+
# start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings
|
34
|
+
# in a pivot transform.
|
35
|
+
# When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you
|
36
|
+
# created the transform, they occur when you start the transform—with the exception of privilege checks. When
|
37
|
+
# Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the
|
38
|
+
# time of creation and uses those same roles. If those roles do not have the required privileges on the source and
|
39
|
+
# destination indices, the transform fails when it attempts unauthorized operations.
|
26
40
|
#
|
27
41
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
42
|
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
@@ -32,6 +46,14 @@ module ElasticsearchServerless
|
|
32
46
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html
|
33
47
|
#
|
34
48
|
def start_transform(arguments = {})
|
49
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.start_transform" }
|
50
|
+
|
51
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
52
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
53
|
+
set_variables
|
54
|
+
end
|
55
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
56
|
+
|
35
57
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
36
58
|
|
37
59
|
arguments = arguments.clone
|
@@ -46,7 +68,7 @@ module ElasticsearchServerless
|
|
46
68
|
params = Utils.process_params(arguments)
|
47
69
|
|
48
70
|
ElasticsearchServerless::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
71
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
72
|
)
|
51
73
|
end
|
52
74
|
end
|
@@ -22,19 +22,36 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
+
# Stop transforms.
|
25
26
|
# Stops one or more transforms.
|
26
27
|
#
|
27
|
-
# @option arguments [String] :transform_id Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression.
|
28
|
-
#
|
28
|
+
# @option arguments [String] :transform_id Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression.
|
29
|
+
# To stop all transforms, use +_all+ or +*+ as the identifier. (*Required*)
|
30
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no transforms that match;
|
31
|
+
# contains the +_all+ string or no identifiers and there are no matches; contains wildcard expressions and there
|
32
|
+
# are only partial matches.If it is true, the API returns a successful acknowledgement message when there are no matches. When there are
|
33
|
+
# only partial matches, the API stops the appropriate transforms.If it is false, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.
|
29
34
|
# @option arguments [Boolean] :force If it is true, the API forcefully stops the transforms.
|
30
|
-
# @option arguments [Time] :timeout Period to wait for a response when +wait_for_completion+ is +true+. If no response is received before the
|
31
|
-
#
|
32
|
-
#
|
35
|
+
# @option arguments [Time] :timeout Period to wait for a response when +wait_for_completion+ is +true+. If no response is received before the
|
36
|
+
# timeout expires, the request returns a timeout exception. However, the request continues processing and
|
37
|
+
# eventually moves the transform to a STOPPED state. Server default: 30s.
|
38
|
+
# @option arguments [Boolean] :wait_for_checkpoint If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false,
|
39
|
+
# the transform stops as soon as possible.
|
40
|
+
# @option arguments [Boolean] :wait_for_completion If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns
|
41
|
+
# immediately and the indexer is stopped asynchronously in the background.
|
33
42
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
43
|
#
|
35
44
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html
|
36
45
|
#
|
37
46
|
def stop_transform(arguments = {})
|
47
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.stop_transform" }
|
48
|
+
|
49
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
50
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
51
|
+
set_variables
|
52
|
+
end
|
53
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
54
|
+
|
38
55
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
39
56
|
|
40
57
|
arguments = arguments.clone
|
@@ -49,7 +66,7 @@ module ElasticsearchServerless
|
|
49
66
|
params = Utils.process_params(arguments)
|
50
67
|
|
51
68
|
ElasticsearchServerless::API::Response.new(
|
52
|
-
perform_request(method, path, params, body, headers)
|
69
|
+
perform_request(method, path, params, body, headers, request_opts)
|
53
70
|
)
|
54
71
|
end
|
55
72
|
end
|
@@ -22,17 +22,34 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Transform
|
24
24
|
module Actions
|
25
|
+
# Update a transform.
|
25
26
|
# Updates certain properties of a transform.
|
27
|
+
# All updated properties except +description+ do not take effect until after the transform starts the next checkpoint,
|
28
|
+
# thus there is data consistency in each checkpoint. To use this API, you must have +read+ and +view_index_metadata+
|
29
|
+
# privileges for the source indices. You must also have +index+ and +read+ privileges for the destination index. When
|
30
|
+
# Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the
|
31
|
+
# time of update and runs with those privileges.
|
26
32
|
#
|
27
33
|
# @option arguments [String] :transform_id Identifier for the transform. (*Required*)
|
28
|
-
# @option arguments [Boolean] :defer_validation When true, deferrable validations are not run. This behavior may be
|
29
|
-
#
|
34
|
+
# @option arguments [Boolean] :defer_validation When true, deferrable validations are not run. This behavior may be
|
35
|
+
# desired if the source index does not exist until after the transform is
|
36
|
+
# created.
|
37
|
+
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the
|
38
|
+
# timeout expires, the request fails and returns an error. Server default: 30s.
|
30
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
40
|
# @option arguments [Hash] :body request body
|
32
41
|
#
|
33
42
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html
|
34
43
|
#
|
35
44
|
def update_transform(arguments = {})
|
45
|
+
request_opts = { endpoint: arguments[:endpoint] || "transform.update_transform" }
|
46
|
+
|
47
|
+
defined_params = [:transform_id].inject({}) do |set_variables, variable|
|
48
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
49
|
+
set_variables
|
50
|
+
end
|
51
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
52
|
+
|
36
53
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
37
54
|
raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]
|
38
55
|
|
@@ -48,7 +65,7 @@ module ElasticsearchServerless
|
|
48
65
|
params = Utils.process_params(arguments)
|
49
66
|
|
50
67
|
ElasticsearchServerless::API::Response.new(
|
51
|
-
perform_request(method, path, params, body, headers)
|
68
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
69
|
)
|
53
70
|
end
|
54
71
|
end
|
@@ -21,20 +21,28 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Update a document.
|
25
|
+
# Updates a document by running a script or passing a partial document.
|
25
26
|
#
|
26
27
|
# @option arguments [String] :id Document ID (*Required*)
|
27
28
|
# @option arguments [String] :index The name of the index (*Required*)
|
28
29
|
# @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term.
|
29
30
|
# @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number.
|
30
31
|
# @option arguments [String] :lang The script language. Server default: painless.
|
31
|
-
# @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation
|
32
|
+
# @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation
|
33
|
+
# visible to search, if 'wait_for' then wait for a refresh to make this operation
|
34
|
+
# visible to search, if 'false' do nothing with refreshes. Server default: false.
|
32
35
|
# @option arguments [Boolean] :require_alias If true, the destination must be an index alias.
|
33
36
|
# @option arguments [Integer] :retry_on_conflict Specify how many times should the operation be retried when a conflict occurs. Server default: 0.
|
34
37
|
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
35
|
-
# @option arguments [Time] :timeout Period to wait for dynamic mapping updates and active shards.
|
36
|
-
#
|
37
|
-
#
|
38
|
+
# @option arguments [Time] :timeout Period to wait for dynamic mapping updates and active shards.
|
39
|
+
# This guarantees Elasticsearch waits for at least the timeout before failing.
|
40
|
+
# The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
|
41
|
+
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operations.
|
42
|
+
# Set to 'all' or any positive integer up to the total number of shards in the index
|
43
|
+
# (number_of_replicas+1). Defaults to 1 meaning the primary shard. Server default: 1.
|
44
|
+
# @option arguments [Boolean, String, Array<String>] :_source Set to false to disable source retrieval. You can also specify a comma-separated
|
45
|
+
# list of the fields you want to retrieve. Server default: true.
|
38
46
|
# @option arguments [String, Array<String>] :_source_excludes Specify the source fields you want to exclude.
|
39
47
|
# @option arguments [String, Array<String>] :_source_includes Specify the source fields you want to retrieve.
|
40
48
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -43,6 +51,14 @@ module ElasticsearchServerless
|
|
43
51
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
|
44
52
|
#
|
45
53
|
def update(arguments = {})
|
54
|
+
request_opts = { endpoint: arguments[:endpoint] || "update" }
|
55
|
+
|
56
|
+
defined_params = [:index, :id].inject({}) do |set_variables, variable|
|
57
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
58
|
+
set_variables
|
59
|
+
end
|
60
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
61
|
+
|
46
62
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
47
63
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
48
64
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
@@ -63,12 +79,12 @@ module ElasticsearchServerless
|
|
63
79
|
if Array(arguments[:ignore]).include?(404)
|
64
80
|
Utils.rescue_from_not_found {
|
65
81
|
ElasticsearchServerless::API::Response.new(
|
66
|
-
perform_request(method, path, params, body, headers)
|
82
|
+
perform_request(method, path, params, body, headers, request_opts)
|
67
83
|
)
|
68
84
|
}
|
69
85
|
else
|
70
86
|
ElasticsearchServerless::API::Response.new(
|
71
|
-
perform_request(method, path, params, body, headers)
|
87
|
+
perform_request(method, path, params, body, headers, request_opts)
|
72
88
|
)
|
73
89
|
end
|
74
90
|
end
|