elasticsearch-serverless 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +3 -4
- data/lib/elasticsearch-serverless/api/async_search/get.rb +4 -5
- data/lib/elasticsearch-serverless/api/async_search/status.rb +7 -6
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +5 -7
- data/lib/elasticsearch-serverless/api/bulk.rb +109 -22
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +17 -14
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +14 -13
- data/lib/elasticsearch-serverless/api/cat/count.rb +13 -14
- data/lib/elasticsearch-serverless/api/cat/help.rb +5 -15
- data/lib/elasticsearch-serverless/api/cat/indices.rb +10 -11
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +7 -13
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +6 -12
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +6 -12
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +7 -12
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +6 -12
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +7 -6
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +3 -3
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +3 -5
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +4 -5
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/cluster/info.rb +3 -4
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +6 -5
- data/lib/elasticsearch-serverless/api/connector/check_in.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/delete.rb +4 -4
- data/lib/elasticsearch-serverless/api/connector/get.rb +5 -5
- data/lib/elasticsearch-serverless/api/connector/list.rb +4 -3
- data/lib/elasticsearch-serverless/api/connector/post.rb +3 -3
- data/lib/elasticsearch-serverless/api/connector/put.rb +4 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +7 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +7 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +7 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +3 -3
- data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +3 -3
- data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_error.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +2 -3
- data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_name.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_native.rb +2 -3
- data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_status.rb +3 -4
- data/lib/elasticsearch-serverless/api/count.rb +36 -25
- data/lib/elasticsearch-serverless/api/create.rb +77 -22
- data/lib/elasticsearch-serverless/api/delete.rb +44 -18
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +91 -29
- data/lib/elasticsearch-serverless/api/delete_script.rb +10 -9
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +5 -5
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +6 -5
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +6 -6
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/delete.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/get.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/search.rb +9 -5
- data/lib/elasticsearch-serverless/api/exists.rb +38 -19
- data/lib/elasticsearch-serverless/api/exists_source.rb +23 -18
- data/lib/elasticsearch-serverless/api/explain.rb +25 -16
- data/lib/elasticsearch-serverless/api/field_caps.rb +11 -10
- data/lib/elasticsearch-serverless/api/get.rb +71 -21
- data/lib/elasticsearch-serverless/api/get_script.rb +7 -6
- data/lib/elasticsearch-serverless/api/get_source.rb +25 -15
- data/lib/elasticsearch-serverless/api/graph/explore.rb +9 -5
- data/lib/elasticsearch-serverless/api/index.rb +110 -21
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +23 -12
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +9 -6
- data/lib/elasticsearch-serverless/api/indices/create.rb +19 -6
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +3 -5
- data/lib/elasticsearch-serverless/api/indices/delete.rb +11 -8
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +4 -7
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +3 -4
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +3 -4
- data/lib/elasticsearch-serverless/api/indices/exists.rb +7 -8
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +8 -7
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +6 -6
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +4 -5
- data/lib/elasticsearch-serverless/api/indices/get.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +6 -5
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +4 -5
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +4 -6
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +6 -7
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +3 -4
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +3 -3
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +4 -7
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +4 -6
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +22 -4
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +21 -6
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +17 -7
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +11 -5
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +5 -5
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +28 -5
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +4 -5
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +3 -3
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +4 -5
- data/lib/elasticsearch-serverless/api/inference/chat_completion_unified.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/completion.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/delete.rb +6 -7
- data/lib/elasticsearch-serverless/api/inference/get.rb +4 -5
- data/lib/elasticsearch-serverless/api/inference/put.rb +12 -5
- data/lib/elasticsearch-serverless/api/inference/put_watsonx.rb +78 -0
- data/lib/elasticsearch-serverless/api/inference/rerank.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/sparse_embedding.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/text_embedding.rb +62 -0
- data/lib/elasticsearch-serverless/api/info.rb +4 -4
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +5 -5
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +6 -6
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +5 -4
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +3 -4
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +9 -8
- data/lib/elasticsearch-serverless/api/license/get.rb +4 -5
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +7 -6
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +7 -7
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +7 -6
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +4 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +5 -5
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +3 -3
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +3 -9
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +5 -6
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +6 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +6 -6
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +16 -5
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +7 -6
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +3 -4
- data/lib/elasticsearch-serverless/api/mget.rb +12 -5
- data/lib/elasticsearch-serverless/api/msearch.rb +16 -17
- data/lib/elasticsearch-serverless/api/msearch_template.rb +22 -15
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +15 -12
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +29 -12
- data/lib/elasticsearch-serverless/api/ping.rb +8 -10
- data/lib/elasticsearch-serverless/api/put_script.rb +12 -11
- data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +6 -5
- data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +6 -5
- data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +5 -5
- data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +5 -5
- data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +7 -6
- data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +11 -7
- data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +11 -6
- data/lib/elasticsearch-serverless/api/query_rules/test.rb +5 -5
- data/lib/elasticsearch-serverless/api/rank_eval.rb +6 -6
- data/lib/elasticsearch-serverless/api/reindex.rb +146 -9
- data/lib/elasticsearch-serverless/api/render_search_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/response.rb +1 -1
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +7 -3
- data/lib/elasticsearch-serverless/api/scroll.rb +4 -4
- data/lib/elasticsearch-serverless/api/search.rb +77 -69
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +4 -5
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/get.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +4 -5
- data/lib/elasticsearch-serverless/api/search_application/list.rb +5 -4
- data/lib/elasticsearch-serverless/api/search_application/put.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/search.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_mvt.rb +131 -9
- data/lib/elasticsearch-serverless/api/search_template.rb +12 -12
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +3 -3
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +7 -3
- data/lib/elasticsearch-serverless/api/security/delete_role.rb +6 -5
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +3 -3
- data/lib/elasticsearch-serverless/api/security/get_builtin_privileges.rb +3 -3
- data/lib/elasticsearch-serverless/api/security/get_role.rb +11 -8
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +6 -5
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +8 -6
- data/lib/elasticsearch-serverless/api/security/put_role.rb +3 -4
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +12 -6
- data/lib/elasticsearch-serverless/api/security/query_role.rb +61 -0
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +74 -0
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +4 -4
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +10 -6
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +16 -13
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +6 -6
- data/lib/elasticsearch-serverless/api/sql/query.rb +8 -5
- data/lib/elasticsearch-serverless/api/sql/translate.rb +6 -4
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +17 -6
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +7 -7
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +7 -8
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +7 -7
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +7 -6
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -6
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -7
- data/lib/elasticsearch-serverless/api/tasks/get.rb +9 -7
- data/lib/elasticsearch-serverless/api/terms_enum.rb +7 -9
- data/lib/elasticsearch-serverless/api/termvectors.rb +39 -16
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +3 -5
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +5 -6
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +4 -5
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +3 -4
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +4 -5
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +7 -8
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +3 -5
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +3 -4
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +3 -4
- data/lib/elasticsearch-serverless/api/update.rb +36 -24
- data/lib/elasticsearch-serverless/api/update_by_query.rb +102 -31
- data/lib/elasticsearch-serverless/api.rb +22 -25
- data/lib/elasticsearch-serverless/version.rb +1 -1
- data/lib/elasticsearch-serverless.rb +7 -0
- metadata +18 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46610e7bad335976f71606b118384e4651fa882602bacbe3055e713cc16f4f63
|
4
|
+
data.tar.gz: 5633ddb2686aac1df293e338b885e20c0528a315a96dfeaf2bb72fa784f42e6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14d1e876b5c56273ede725d0835ee3f35b86d3dcbc0f1147eb35d8ea8de40ce8a0cbbeec61f339b1f5e181089917294d23e03d836c2f6d12b853d9838ddb9382
|
7
|
+
data.tar.gz: 27d8516161d3a158cb144d9ec17ca1efaf8d130f5f1121eb2c27e500673e71c71dd382f945f55f85f065d85d6a97ecbd4e1c8fbfd42ed70cec3a6d31c93fff84
|
@@ -30,14 +30,13 @@ module ElasticsearchServerless
|
|
30
30
|
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
|
31
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
32
|
#
|
33
|
-
# @see https://www.elastic.co/
|
33
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
|
34
34
|
#
|
35
35
|
def delete(arguments = {})
|
36
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || 'async_search.delete' }
|
37
37
|
|
38
|
-
defined_params = [:id].
|
38
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
39
39
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
40
|
-
set_variables
|
41
40
|
end
|
42
41
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
42
|
|
@@ -27,7 +27,7 @@ module ElasticsearchServerless
|
|
27
27
|
# If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
|
28
28
|
#
|
29
29
|
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
|
30
|
-
# @option arguments [Time] :keep_alive
|
30
|
+
# @option arguments [Time] :keep_alive The length of time that the async search should be available in the cluster.
|
31
31
|
# When not specified, the +keep_alive+ set with the corresponding submit async request will be used.
|
32
32
|
# Otherwise, it is possible to override the value and extend the validity of the request.
|
33
33
|
# When this period expires, the search, if still running, is cancelled.
|
@@ -38,14 +38,13 @@ module ElasticsearchServerless
|
|
38
38
|
# By default no timeout is set meaning that the currently available results will be returned without any additional wait.
|
39
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
40
40
|
#
|
41
|
-
# @see https://www.elastic.co/
|
41
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
|
42
42
|
#
|
43
43
|
def get(arguments = {})
|
44
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
44
|
+
request_opts = { endpoint: arguments[:endpoint] || 'async_search.get' }
|
45
45
|
|
46
|
-
defined_params = [:id].
|
46
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
47
47
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
48
|
-
set_variables
|
49
48
|
end
|
50
49
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
51
50
|
|
@@ -24,21 +24,22 @@ module ElasticsearchServerless
|
|
24
24
|
module Actions
|
25
25
|
# Get the async search status.
|
26
26
|
# Get the status of a previously submitted async search request given its identifier, without retrieving search results.
|
27
|
-
# If the Elasticsearch security features are enabled,
|
27
|
+
# If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:
|
28
|
+
# * The user or API key that submitted the original async search request.
|
29
|
+
# * Users that have the +monitor+ cluster privilege or greater privileges.
|
28
30
|
#
|
29
31
|
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
|
30
|
-
# @option arguments [Time] :keep_alive
|
32
|
+
# @option arguments [Time] :keep_alive The length of time that the async search needs to be available.
|
31
33
|
# Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
|
32
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
35
|
#
|
34
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
|
35
37
|
#
|
36
38
|
def status(arguments = {})
|
37
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'async_search.status' }
|
38
40
|
|
39
|
-
defined_params = [:id].
|
41
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
40
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
41
|
-
set_variables
|
42
43
|
end
|
43
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
45
|
|
@@ -31,9 +31,9 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [String, Array] :index A comma-separated list of index names to search; use +_all+ or empty string to perform the operation on all indices
|
32
32
|
# @option arguments [Time] :wait_for_completion_timeout Blocks and waits until the search is completed up to a certain timeout.
|
33
33
|
# When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. Server default: 1s.
|
34
|
-
# @option arguments [Boolean] :keep_on_completion If +true+, results are stored for later retrieval when the search completes within the +wait_for_completion_timeout+.
|
35
34
|
# @option arguments [Time] :keep_alive Specifies how long the async search needs to be available.
|
36
35
|
# Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
|
36
|
+
# @option arguments [Boolean] :keep_on_completion If +true+, results are stored for later retrieval when the search completes within the +wait_for_completion_timeout+.
|
37
37
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified)
|
38
38
|
# @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
|
39
39
|
# @option arguments [String] :analyzer The analyzer to use for the query string
|
@@ -51,7 +51,6 @@ module ElasticsearchServerless
|
|
51
51
|
# @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
52
52
|
# @option arguments [Integer] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
|
53
53
|
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
54
|
-
# @option arguments [Integer] :pre_filter_shard_size The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped. Server default: 1.
|
55
54
|
# @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true Server default: true.
|
56
55
|
# @option arguments [String] :routing A comma-separated list of specific routing values
|
57
56
|
# @option arguments [String] :search_type Search operation type
|
@@ -79,14 +78,13 @@ module ElasticsearchServerless
|
|
79
78
|
# @option arguments [Hash] :headers Custom HTTP headers
|
80
79
|
# @option arguments [Hash] :body request body
|
81
80
|
#
|
82
|
-
# @see https://www.elastic.co/
|
81
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
|
83
82
|
#
|
84
83
|
def submit(arguments = {})
|
85
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
84
|
+
request_opts = { endpoint: arguments[:endpoint] || 'async_search.submit' }
|
86
85
|
|
87
|
-
defined_params = [:index].
|
86
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
88
87
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
89
|
-
set_variables
|
90
88
|
end
|
91
89
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
92
90
|
|
@@ -101,7 +99,7 @@ module ElasticsearchServerless
|
|
101
99
|
path = if _index
|
102
100
|
"#{Utils.listify(_index)}/_async_search"
|
103
101
|
else
|
104
|
-
|
102
|
+
'_async_search'
|
105
103
|
end
|
106
104
|
params = Utils.process_params(arguments)
|
107
105
|
|
@@ -22,34 +22,121 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Bulk index or delete documents.
|
25
|
-
#
|
25
|
+
# Perform multiple +index+, +create+, +delete+, and +update+ actions in a single request.
|
26
26
|
# This reduces overhead and can greatly increase indexing speed.
|
27
|
+
# If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
|
28
|
+
# * To use the +create+ action, you must have the +create_doc+, +create+, +index+, or +write+ index privilege. Data streams support only the +create+ action.
|
29
|
+
# * To use the +index+ action, you must have the +create+, +index+, or +write+ index privilege.
|
30
|
+
# * To use the +delete+ action, you must have the +delete+ or +write+ index privilege.
|
31
|
+
# * To use the +update+ action, you must have the +index+ or +write+ index privilege.
|
32
|
+
# * To automatically create a data stream or index with a bulk API request, you must have the +auto_configure+, +create_index+, or +manage+ index privilege.
|
33
|
+
# * To make the result of a bulk operation visible to search using the +refresh+ parameter, you must have the +maintenance+ or +manage+ index privilege.
|
34
|
+
# Automatic data stream creation requires a matching index template with data stream enabled.
|
35
|
+
# The actions are specified in the request body using a newline delimited JSON (NDJSON) structure:
|
36
|
+
# +
|
37
|
+
# action_and_meta_data\n
|
38
|
+
# optional_source\n
|
39
|
+
# action_and_meta_data\n
|
40
|
+
# optional_source\n
|
41
|
+
# ....
|
42
|
+
# action_and_meta_data\n
|
43
|
+
# optional_source\n
|
44
|
+
# +
|
45
|
+
# The +index+ and +create+ actions expect a source on the next line and have the same semantics as the +op_type+ parameter in the standard index API.
|
46
|
+
# A +create+ action fails if a document with the same ID already exists in the target
|
47
|
+
# An +index+ action adds or replaces a document as necessary.
|
48
|
+
# NOTE: Data streams support only the +create+ action.
|
49
|
+
# To update or delete a document in a data stream, you must target the backing index containing the document.
|
50
|
+
# An +update+ action expects that the partial doc, upsert, and script and its options are specified on the next line.
|
51
|
+
# A +delete+ action does not expect a source on the next line and has the same semantics as the standard delete API.
|
52
|
+
# NOTE: The final line of data must end with a newline character (+\n+).
|
53
|
+
# Each newline character may be preceded by a carriage return (+\r+).
|
54
|
+
# When sending NDJSON data to the +_bulk+ endpoint, use a +Content-Type+ header of +application/json+ or +application/x-ndjson+.
|
55
|
+
# Because this format uses literal newline characters (+\n+) as delimiters, make sure that the JSON actions and sources are not pretty printed.
|
56
|
+
# If you provide a target in the request path, it is used for any actions that don't explicitly specify an +_index+ argument.
|
57
|
+
# A note on the format: the idea here is to make processing as fast as possible.
|
58
|
+
# As some of the actions are redirected to other shards on other nodes, only +action_meta_data+ is parsed on the receiving node side.
|
59
|
+
# Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.
|
60
|
+
# There is no "correct" number of actions to perform in a single bulk request.
|
61
|
+
# Experiment with different settings to find the optimal size for your particular workload.
|
62
|
+
# Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.
|
63
|
+
# It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.
|
64
|
+
# For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.
|
65
|
+
# **Client suppport for bulk requests**
|
66
|
+
# Some of the officially supported clients provide helpers to assist with bulk requests and reindexing:
|
67
|
+
# * Go: Check out +esutil.BulkIndexer+
|
68
|
+
# * Perl: Check out +Search::Elasticsearch::Client::5_0::Bulk+ and +Search::Elasticsearch::Client::5_0::Scroll+
|
69
|
+
# * Python: Check out +elasticsearch.helpers.*+
|
70
|
+
# * JavaScript: Check out +client.helpers.*+
|
71
|
+
# * .NET: Check out +BulkAllObservable+
|
72
|
+
# * PHP: Check out bulk indexing.
|
73
|
+
# **Submitting bulk requests with cURL**
|
74
|
+
# If you're providing text file input to +curl+, you must use the +--data-binary+ flag instead of plain +-d+.
|
75
|
+
# The latter doesn't preserve newlines. For example:
|
76
|
+
# +
|
77
|
+
# $ cat requests
|
78
|
+
# { "index" : { "_index" : "test", "_id" : "1" } }
|
79
|
+
# { "field1" : "value1" }
|
80
|
+
# $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@requests"; echo
|
81
|
+
# {"took":7, "errors": false, "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]}
|
82
|
+
# +
|
83
|
+
# **Optimistic concurrency control**
|
84
|
+
# Each +index+ and +delete+ action within a bulk API call may include the +if_seq_no+ and +if_primary_term+ parameters in their respective action and meta data lines.
|
85
|
+
# The +if_seq_no+ and +if_primary_term+ parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.
|
86
|
+
# **Versioning**
|
87
|
+
# Each bulk item can include the version value using the +version+ field.
|
88
|
+
# It automatically follows the behavior of the index or delete operation based on the +_version+ mapping.
|
89
|
+
# It also support the +version_type+.
|
90
|
+
# **Routing**
|
91
|
+
# Each bulk item can include the routing value using the +routing+ field.
|
92
|
+
# It automatically follows the behavior of the index or delete operation based on the +_routing+ mapping.
|
93
|
+
# NOTE: Data streams do not support custom routing unless they were created with the +allow_custom_routing+ setting enabled in the template.
|
94
|
+
# **Wait for active shards**
|
95
|
+
# When making bulk calls, you can set the +wait_for_active_shards+ parameter to require a minimum number of shard copies to be active before starting to process the bulk request.
|
96
|
+
# **Refresh**
|
97
|
+
# Control when the changes made by this request are visible to search.
|
98
|
+
# NOTE: Only the shards that receive the bulk request will be affected by refresh.
|
99
|
+
# Imagine a +_bulk?refresh=wait_for+ request with three documents in it that happen to be routed to different shards in an index with five shards.
|
100
|
+
# The request will only wait for those three shards to refresh.
|
101
|
+
# The other two shards that make up the index do not participate in the +_bulk+ request at all.
|
27
102
|
#
|
28
|
-
# @option arguments [String] :index
|
29
|
-
# @option arguments [
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
103
|
+
# @option arguments [String] :index The name of the data stream, index, or index alias to perform bulk actions on.
|
104
|
+
# @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Server default: true.
|
105
|
+
# @option arguments [Boolean] :list_executed_pipelines If +true+, the response will include the ingest pipelines that were run for each index or create.
|
106
|
+
# @option arguments [String] :pipeline The pipeline identifier to use to preprocess incoming documents.
|
107
|
+
# If the index has a default ingest pipeline specified, setting the value to +_none+ turns off the default ingest pipeline for this request.
|
108
|
+
# If a final pipeline is configured, it will always run regardless of the value of this parameter.
|
109
|
+
# @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search.
|
110
|
+
# If +wait_for+, wait for a refresh to make this operation visible to search.
|
111
|
+
# If +false+, do nothing with refreshes.
|
33
112
|
# Valid values: +true+, +false+, +wait_for+. Server default: false.
|
34
|
-
# @option arguments [String] :routing
|
35
|
-
# @option arguments [Boolean, String, Array<String>] :_source
|
113
|
+
# @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
|
114
|
+
# @option arguments [Boolean, String, Array<String>] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or contains a list of fields to return.
|
36
115
|
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
116
|
+
# You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter.
|
117
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
37
118
|
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
38
|
-
#
|
119
|
+
# If this parameter is specified, only these source fields are returned.
|
120
|
+
# You can exclude fields from this subset using the +_source_excludes+ query parameter.
|
121
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
122
|
+
# @option arguments [Time] :timeout The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.
|
123
|
+
# The default is +1m+ (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.
|
124
|
+
# The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
|
39
125
|
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
|
40
|
-
# Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+).
|
41
|
-
#
|
126
|
+
# Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+).
|
127
|
+
# The default is +1+, which waits for each primary shard to be active. Server default: 1.
|
128
|
+
# @option arguments [Boolean] :require_alias If +true+, the request's actions must target an index alias.
|
129
|
+
# @option arguments [Boolean] :require_data_stream If +true+, the request's actions must target a data stream (existing or to be created).
|
42
130
|
# @option arguments [Hash] :headers Custom HTTP headers
|
43
131
|
# @option arguments [String|Array] :body operations. Array of Strings, Header/Data pairs, or the conveniency "combined" format can be passed, refer to ElasticsearchServerless::API::Utils.bulkify documentation.
|
44
132
|
#
|
45
|
-
# @see https://www.elastic.co/
|
133
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk
|
46
134
|
#
|
47
135
|
def bulk(arguments = {})
|
48
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
136
|
+
request_opts = { endpoint: arguments[:endpoint] || 'bulk' }
|
49
137
|
|
50
|
-
defined_params = [:index].
|
138
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
51
139
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
52
|
-
set_variables
|
53
140
|
end
|
54
141
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
55
142
|
|
@@ -66,17 +153,17 @@ module ElasticsearchServerless
|
|
66
153
|
path = if _index
|
67
154
|
"#{Utils.listify(_index)}/_bulk"
|
68
155
|
else
|
69
|
-
|
156
|
+
'_bulk'
|
70
157
|
end
|
71
158
|
params = Utils.process_params(arguments)
|
72
159
|
|
73
|
-
if body.is_a? Array
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
160
|
+
payload = if body.is_a? Array
|
161
|
+
ElasticsearchServerless::API::Utils.bulkify(body)
|
162
|
+
else
|
163
|
+
body
|
164
|
+
end
|
78
165
|
|
79
|
-
headers.merge!(
|
166
|
+
headers.merge!('Content-Type' => 'application/x-ndjson')
|
80
167
|
ElasticsearchServerless::API::Response.new(
|
81
168
|
perform_request(method, path, params, payload, headers, request_opts)
|
82
169
|
)
|
@@ -23,32 +23,35 @@ module ElasticsearchServerless
|
|
23
23
|
module Cat
|
24
24
|
module Actions
|
25
25
|
# Get aliases.
|
26
|
-
#
|
27
|
-
#
|
28
|
-
# CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
|
26
|
+
# Get the cluster's index aliases, including filter and routing information.
|
27
|
+
# This API does not return data stream aliases.
|
28
|
+
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
|
29
29
|
#
|
30
30
|
# @option arguments [String, Array<String>] :name A comma-separated list of aliases to retrieve. Supports wildcards (+*+). To retrieve all aliases, omit this parameter or use +*+ or +_all+.
|
31
|
-
# @option arguments [String, Array<String>] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
32
|
-
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
|
33
|
-
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
34
31
|
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
|
35
|
-
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
36
|
-
# can't be combined with any other query string option.
|
37
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
|
38
32
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
39
33
|
# Sorting defaults to ascending and can be changed by setting +:asc+
|
40
34
|
# or +:desc+ as a suffix to the column name.
|
35
|
+
# @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
|
36
|
+
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
37
|
+
# It supports comma-separated values, such as +open,hidden+.
|
38
|
+
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
|
39
|
+
# If the master node is not available before the timeout expires, the request fails and returns an error.
|
40
|
+
# To indicated that the request should never timeout, you can set it to +-1+. Server default: 30s.
|
41
|
+
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
|
42
|
+
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
43
|
+
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
44
|
+
# can't be combined with any other query string option.
|
41
45
|
# @option arguments [Boolean] :v When set to +true+ will enable verbose output.
|
42
46
|
# @option arguments [Hash] :headers Custom HTTP headers
|
43
47
|
#
|
44
|
-
# @see https://www.elastic.co/
|
48
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-aliases
|
45
49
|
#
|
46
50
|
def aliases(arguments = {})
|
47
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
51
|
+
request_opts = { endpoint: arguments[:endpoint] || 'cat.aliases' }
|
48
52
|
|
49
|
-
defined_params = [:name].
|
53
|
+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
|
50
54
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
51
|
-
set_variables
|
52
55
|
end
|
53
56
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
54
57
|
|
@@ -63,7 +66,7 @@ module ElasticsearchServerless
|
|
63
66
|
path = if _name
|
64
67
|
"_cat/aliases/#{Utils.listify(_name)}"
|
65
68
|
else
|
66
|
-
|
69
|
+
'_cat/aliases'
|
67
70
|
end
|
68
71
|
params = Utils.process_params(arguments)
|
69
72
|
params[:h] = Utils.listify(params[:h]) if params[:h]
|
@@ -23,36 +23,37 @@ module ElasticsearchServerless
|
|
23
23
|
module Cat
|
24
24
|
module Actions
|
25
25
|
# Get component templates.
|
26
|
-
#
|
26
|
+
# Get information about component templates in a cluster.
|
27
27
|
# Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
|
28
|
-
# CAT APIs are only intended for human consumption using the command line or Kibana console.
|
28
|
+
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.
|
29
29
|
# They are not intended for use by applications. For application consumption, use the get component template API.
|
30
30
|
#
|
31
|
-
# @option arguments [String] :name The name of the component template.
|
31
|
+
# @option arguments [String] :name The name of the component template.
|
32
|
+
# It accepts wildcard expressions.
|
33
|
+
# If it is omitted, all component templates are returned.
|
34
|
+
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
|
35
|
+
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
36
|
+
# Sorting defaults to ascending and can be changed by setting +:asc+
|
37
|
+
# or +:desc+ as a suffix to the column name.
|
32
38
|
# @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
|
33
39
|
# local cluster state. If +false+ the list of selected nodes are computed
|
34
40
|
# from the cluster state of the master node. In both cases the coordinating
|
35
41
|
# node will send requests for further information to each selected node.
|
42
|
+
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node. Server default: 30s.
|
36
43
|
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
|
37
44
|
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
38
|
-
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
|
39
45
|
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
40
46
|
# can't be combined with any other query string option.
|
41
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
|
42
|
-
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
43
|
-
# Sorting defaults to ascending and can be changed by setting +:asc+
|
44
|
-
# or +:desc+ as a suffix to the column name.
|
45
47
|
# @option arguments [Boolean] :v When set to +true+ will enable verbose output.
|
46
48
|
# @option arguments [Hash] :headers Custom HTTP headers
|
47
49
|
#
|
48
|
-
# @see https://www.elastic.co/
|
50
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-component-templates
|
49
51
|
#
|
50
52
|
def component_templates(arguments = {})
|
51
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
53
|
+
request_opts = { endpoint: arguments[:endpoint] || 'cat.component_templates' }
|
52
54
|
|
53
|
-
defined_params = [:name].
|
55
|
+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
|
54
56
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
55
|
-
set_variables
|
56
57
|
end
|
57
58
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
58
59
|
|
@@ -67,7 +68,7 @@ module ElasticsearchServerless
|
|
67
68
|
path = if _name
|
68
69
|
"_cat/component_templates/#{Utils.listify(_name)}"
|
69
70
|
else
|
70
|
-
|
71
|
+
'_cat/component_templates'
|
71
72
|
end
|
72
73
|
params = Utils.process_params(arguments)
|
73
74
|
|
@@ -23,33 +23,32 @@ module ElasticsearchServerless
|
|
23
23
|
module Cat
|
24
24
|
module Actions
|
25
25
|
# Get a document count.
|
26
|
-
#
|
26
|
+
# Get quick access to a document count for a data stream, an index, or an entire cluster.
|
27
27
|
# The document count only includes live documents, not deleted documents which have not yet been removed by the merge process.
|
28
|
-
# CAT APIs are only intended for human consumption using the command line or Kibana console.
|
28
|
+
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.
|
29
29
|
# They are not intended for use by applications. For application consumption, use the count API.
|
30
30
|
#
|
31
|
-
# @option arguments [String, Array] :index
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
31
|
+
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request.
|
32
|
+
# It supports wildcards (+*+).
|
33
|
+
# To target all data streams and indices, omit this parameter or use +*+ or +_all+.
|
35
34
|
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
|
36
|
-
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
37
|
-
# can't be combined with any other query string option.
|
38
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
|
39
35
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
40
36
|
# Sorting defaults to ascending and can be changed by setting +:asc+
|
41
37
|
# or +:desc+ as a suffix to the column name.
|
38
|
+
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
|
39
|
+
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
40
|
+
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
41
|
+
# can't be combined with any other query string option.
|
42
42
|
# @option arguments [Boolean] :v When set to +true+ will enable verbose output.
|
43
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
44
44
|
#
|
45
|
-
# @see https://www.elastic.co/
|
45
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-count
|
46
46
|
#
|
47
47
|
def count(arguments = {})
|
48
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
48
|
+
request_opts = { endpoint: arguments[:endpoint] || 'cat.count' }
|
49
49
|
|
50
|
-
defined_params = [:index].
|
50
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
51
51
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
52
|
-
set_variables
|
53
52
|
end
|
54
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
55
54
|
|
@@ -64,7 +63,7 @@ module ElasticsearchServerless
|
|
64
63
|
path = if _index
|
65
64
|
"_cat/count/#{Utils.listify(_index)}"
|
66
65
|
else
|
67
|
-
|
66
|
+
'_cat/count'
|
68
67
|
end
|
69
68
|
params = Utils.process_params(arguments)
|
70
69
|
params[:h] = Utils.listify(params[:h]) if params[:h]
|
@@ -23,24 +23,14 @@ module ElasticsearchServerless
|
|
23
23
|
module Cat
|
24
24
|
module Actions
|
25
25
|
# Get CAT help.
|
26
|
-
#
|
26
|
+
# Get help for the CAT APIs.
|
27
27
|
#
|
28
|
-
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
|
29
|
-
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
30
|
-
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
|
31
|
-
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
32
|
-
# can't be combined with any other query string option.
|
33
|
-
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
|
34
|
-
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
35
|
-
# Sorting defaults to ascending and can be changed by setting +:asc+
|
36
|
-
# or +:desc+ as a suffix to the column name.
|
37
|
-
# @option arguments [Boolean] :v When set to +true+ will enable verbose output.
|
38
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
39
29
|
#
|
40
|
-
# @see https://www.elastic.co/
|
30
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat
|
41
31
|
#
|
42
32
|
def help(arguments = {})
|
43
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || 'cat.help' }
|
44
34
|
|
45
35
|
arguments = arguments.clone
|
46
36
|
headers = arguments.delete(:headers) || {}
|
@@ -48,8 +38,8 @@ module ElasticsearchServerless
|
|
48
38
|
body = nil
|
49
39
|
|
50
40
|
method = ElasticsearchServerless::API::HTTP_GET
|
51
|
-
path =
|
52
|
-
params =
|
41
|
+
path = '_cat'
|
42
|
+
params = {}
|
53
43
|
|
54
44
|
ElasticsearchServerless::API::Response.new(
|
55
45
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -23,7 +23,7 @@ module ElasticsearchServerless
|
|
23
23
|
module Cat
|
24
24
|
module Actions
|
25
25
|
# Get index information.
|
26
|
-
#
|
26
|
+
# Get high-level information about indices in a cluster, including backing indices for data streams.
|
27
27
|
# Use this request to get the following information for each index in a cluster:
|
28
28
|
# - shard count
|
29
29
|
# - document count
|
@@ -43,26 +43,25 @@ module ElasticsearchServerless
|
|
43
43
|
# @option arguments [Boolean] :include_unloaded_segments If true, the response includes information from segments that are not loaded into memory.
|
44
44
|
# @option arguments [Boolean] :pri If true, the response only includes information from primary shards.
|
45
45
|
# @option arguments [String] :time The unit used to display time values.
|
46
|
-
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
|
47
|
-
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
48
|
-
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
|
49
|
-
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
50
|
-
# can't be combined with any other query string option.
|
51
46
|
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
|
47
|
+
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
|
52
48
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
53
49
|
# Sorting defaults to ascending and can be changed by setting +:asc+
|
54
50
|
# or +:desc+ as a suffix to the column name.
|
51
|
+
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
|
52
|
+
# +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
|
53
|
+
# @option arguments [Boolean] :help When set to +true+ will output available columns. This option
|
54
|
+
# can't be combined with any other query string option.
|
55
55
|
# @option arguments [Boolean] :v When set to +true+ will enable verbose output.
|
56
56
|
# @option arguments [Hash] :headers Custom HTTP headers
|
57
57
|
#
|
58
|
-
# @see https://www.elastic.co/
|
58
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-indices
|
59
59
|
#
|
60
60
|
def indices(arguments = {})
|
61
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
61
|
+
request_opts = { endpoint: arguments[:endpoint] || 'cat.indices' }
|
62
62
|
|
63
|
-
defined_params = [:index].
|
63
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
64
64
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
65
|
-
set_variables
|
66
65
|
end
|
67
66
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
68
67
|
|
@@ -77,7 +76,7 @@ module ElasticsearchServerless
|
|
77
76
|
path = if _index
|
78
77
|
"_cat/indices/#{Utils.listify(_index)}"
|
79
78
|
else
|
80
|
-
|
79
|
+
'_cat/indices'
|
81
80
|
end
|
82
81
|
params = Utils.process_params(arguments)
|
83
82
|
params[:h] = Utils.listify(params[:h]) if params[:h]
|