elasticsearch-serverless 0.5.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 +11 -8
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +6 -10
- data/lib/elasticsearch-serverless/api/bulk.rb +109 -22
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +17 -18
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +17 -16
- data/lib/elasticsearch-serverless/api/cat/count.rb +13 -18
- data/lib/elasticsearch-serverless/api/cat/help.rb +5 -19
- data/lib/elasticsearch-serverless/api/cat/indices.rb +10 -15
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +7 -17
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +6 -16
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +6 -16
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +7 -16
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +6 -16
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +9 -7
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +8 -4
- 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 +16 -13
- 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 -8
- 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 -6
- 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 -11
- data/lib/elasticsearch-serverless/api/inference/get.rb +4 -9
- data/lib/elasticsearch-serverless/api/inference/inference.rb +0 -4
- data/lib/elasticsearch-serverless/api/inference/put.rb +12 -9
- 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 +23 -16
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +15 -12
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +33 -11
- 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 +8 -7
- data/lib/elasticsearch-serverless/api/reindex.rb +146 -9
- data/lib/elasticsearch-serverless/api/render_search_template.rb +7 -7
- 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 +79 -72
- 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 +132 -10
- data/lib/elasticsearch-serverless/api/search_template.rb +13 -13
- 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 +40 -17
- 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
@@ -34,13 +34,14 @@ module ElasticsearchServerless
|
|
34
34
|
# @option arguments [String, Array] :index_name A comma-separated list of connector index names to fetch connector documents for
|
35
35
|
# @option arguments [String, Array<String>] :connector_name A comma-separated list of connector names to fetch connector documents for
|
36
36
|
# @option arguments [String, Array<String>] :service_type A comma-separated list of connector service types to fetch connector documents for
|
37
|
+
# @option arguments [Boolean] :include_deleted A flag to indicate if the desired connector should be fetched, even if it was soft-deleted.
|
37
38
|
# @option arguments [String] :query A wildcard query string that filters connectors with matching name, description or index name
|
38
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
39
40
|
#
|
40
|
-
# @see https://www.elastic.co/
|
41
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-list
|
41
42
|
#
|
42
43
|
def list(arguments = {})
|
43
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
44
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.list' }
|
44
45
|
|
45
46
|
arguments = arguments.clone
|
46
47
|
headers = arguments.delete(:headers) || {}
|
@@ -48,7 +49,7 @@ module ElasticsearchServerless
|
|
48
49
|
body = nil
|
49
50
|
|
50
51
|
method = ElasticsearchServerless::API::HTTP_GET
|
51
|
-
path =
|
52
|
+
path = '_connector'
|
52
53
|
params = Utils.process_params(arguments)
|
53
54
|
|
54
55
|
ElasticsearchServerless::API::Response.new(
|
@@ -34,10 +34,10 @@ module ElasticsearchServerless
|
|
34
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
35
|
# @option arguments [Hash] :body request body
|
36
36
|
#
|
37
|
-
# @see https://www.elastic.co/
|
37
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put
|
38
38
|
#
|
39
39
|
def post(arguments = {})
|
40
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.post' }
|
41
41
|
|
42
42
|
arguments = arguments.clone
|
43
43
|
headers = arguments.delete(:headers) || {}
|
@@ -45,7 +45,7 @@ module ElasticsearchServerless
|
|
45
45
|
body = arguments.delete(:body)
|
46
46
|
|
47
47
|
method = ElasticsearchServerless::API::HTTP_POST
|
48
|
-
path =
|
48
|
+
path = '_connector'
|
49
49
|
params = {}
|
50
50
|
|
51
51
|
ElasticsearchServerless::API::Response.new(
|
@@ -32,14 +32,13 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body request body
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put
|
36
36
|
#
|
37
37
|
def put(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.put' }
|
39
39
|
|
40
|
-
defined_params = [:connector_id].
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
41
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
42
|
end
|
44
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
44
|
|
@@ -54,7 +53,7 @@ module ElasticsearchServerless
|
|
54
53
|
path = if _connector_id
|
55
54
|
"_connector/#{Utils.listify(_connector_id)}"
|
56
55
|
else
|
57
|
-
|
56
|
+
'_connector'
|
58
57
|
end
|
59
58
|
params = {}
|
60
59
|
|
@@ -33,19 +33,20 @@ module ElasticsearchServerless
|
|
33
33
|
# @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job (*Required*)
|
34
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-cancel
|
37
37
|
#
|
38
38
|
def sync_job_cancel(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_cancel' }
|
40
40
|
|
41
|
-
defined_params = [:connector_sync_job_id].
|
41
|
+
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
|
42
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
-
set_variables
|
44
43
|
end
|
45
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
45
|
|
47
|
-
|
48
|
-
|
46
|
+
unless arguments[:connector_sync_job_id]
|
47
|
+
raise ArgumentError,
|
48
|
+
"Required argument 'connector_sync_job_id' missing"
|
49
|
+
end
|
49
50
|
|
50
51
|
arguments = arguments.clone
|
51
52
|
headers = arguments.delete(:headers) || {}
|
@@ -33,19 +33,20 @@ module ElasticsearchServerless
|
|
33
33
|
# @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job to be deleted (*Required*)
|
34
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-delete
|
37
37
|
#
|
38
38
|
def sync_job_delete(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_delete' }
|
40
40
|
|
41
|
-
defined_params = [:connector_sync_job_id].
|
41
|
+
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
|
42
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
-
set_variables
|
44
43
|
end
|
45
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
45
|
|
47
|
-
|
48
|
-
|
46
|
+
unless arguments[:connector_sync_job_id]
|
47
|
+
raise ArgumentError,
|
48
|
+
"Required argument 'connector_sync_job_id' missing"
|
49
|
+
end
|
49
50
|
|
50
51
|
arguments = arguments.clone
|
51
52
|
headers = arguments.delete(:headers) || {}
|
@@ -31,19 +31,20 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [String] :connector_sync_job_id The unique identifier of the connector sync job (*Required*)
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
#
|
34
|
-
# @see https://www.elastic.co/
|
34
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-get
|
35
35
|
#
|
36
36
|
def sync_job_get(arguments = {})
|
37
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
37
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_get' }
|
38
38
|
|
39
|
-
defined_params = [:connector_sync_job_id].
|
39
|
+
defined_params = [:connector_sync_job_id].each_with_object({}) do |variable, set_variables|
|
40
40
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
41
|
-
set_variables
|
42
41
|
end
|
43
42
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
43
|
|
45
|
-
|
46
|
-
|
44
|
+
unless arguments[:connector_sync_job_id]
|
45
|
+
raise ArgumentError,
|
46
|
+
"Required argument 'connector_sync_job_id' missing"
|
47
|
+
end
|
47
48
|
|
48
49
|
arguments = arguments.clone
|
49
50
|
headers = arguments.delete(:headers) || {}
|
@@ -36,10 +36,10 @@ module ElasticsearchServerless
|
|
36
36
|
# @option arguments [Syncjobtype] :job_type A comma-separated list of job types to fetch the sync jobs for
|
37
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
38
38
|
#
|
39
|
-
# @see https://www.elastic.co/
|
39
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list
|
40
40
|
#
|
41
41
|
def sync_job_list(arguments = {})
|
42
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
42
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_list' }
|
43
43
|
|
44
44
|
arguments = arguments.clone
|
45
45
|
headers = arguments.delete(:headers) || {}
|
@@ -47,7 +47,7 @@ module ElasticsearchServerless
|
|
47
47
|
body = nil
|
48
48
|
|
49
49
|
method = ElasticsearchServerless::API::HTTP_GET
|
50
|
-
path =
|
50
|
+
path = '_connector/_sync_job'
|
51
51
|
params = Utils.process_params(arguments)
|
52
52
|
|
53
53
|
ElasticsearchServerless::API::Response.new(
|
@@ -32,10 +32,10 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body request body
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-post
|
36
36
|
#
|
37
37
|
def sync_job_post(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.sync_job_post' }
|
39
39
|
|
40
40
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
41
41
|
|
@@ -45,7 +45,7 @@ module ElasticsearchServerless
|
|
45
45
|
body = arguments.delete(:body)
|
46
46
|
|
47
47
|
method = ElasticsearchServerless::API::HTTP_POST
|
48
|
-
path =
|
48
|
+
path = '_connector/_sync_job'
|
49
49
|
params = {}
|
50
50
|
|
51
51
|
ElasticsearchServerless::API::Response.new(
|
@@ -32,14 +32,13 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [String] :connector_id The unique identifier of the connector to be updated (*Required*)
|
33
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering
|
36
36
|
#
|
37
37
|
def update_active_filtering(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_active_filtering' }
|
39
39
|
|
40
|
-
defined_params = [:connector_id].
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
41
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
42
|
end
|
44
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
44
|
|
@@ -36,14 +36,13 @@ module ElasticsearchServerless
|
|
36
36
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
37
|
# @option arguments [Hash] :body request body
|
38
38
|
#
|
39
|
-
# @see https://www.elastic.co/
|
39
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-api-key-id
|
40
40
|
#
|
41
41
|
def update_api_key_id(arguments = {})
|
42
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
42
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_api_key_id' }
|
43
43
|
|
44
|
-
defined_params = [:connector_id].
|
44
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
45
45
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
46
|
-
set_variables
|
47
46
|
end
|
48
47
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
49
48
|
|
@@ -33,14 +33,13 @@ module ElasticsearchServerless
|
|
33
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
34
|
# @option arguments [Hash] :body request body
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-configuration
|
37
37
|
#
|
38
38
|
def update_configuration(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_configuration' }
|
40
40
|
|
41
|
-
defined_params = [:connector_id].
|
41
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
42
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
-
set_variables
|
44
43
|
end
|
45
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
45
|
|
@@ -35,14 +35,13 @@ module ElasticsearchServerless
|
|
35
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
36
|
# @option arguments [Hash] :body request body
|
37
37
|
#
|
38
|
-
# @see https://www.elastic.co/
|
38
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-error
|
39
39
|
#
|
40
40
|
def update_error(arguments = {})
|
41
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_error' }
|
42
42
|
|
43
|
-
defined_params = [:connector_id].
|
43
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
44
44
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
45
|
-
set_variables
|
46
45
|
end
|
47
46
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
48
47
|
|
@@ -35,14 +35,13 @@ module ElasticsearchServerless
|
|
35
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
36
|
# @option arguments [Hash] :body request body
|
37
37
|
#
|
38
|
-
# @see https://www.elastic.co/
|
38
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering
|
39
39
|
#
|
40
40
|
def update_filtering(arguments = {})
|
41
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering' }
|
42
42
|
|
43
|
-
defined_params = [:connector_id].
|
43
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
44
44
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
45
|
-
set_variables
|
46
45
|
end
|
47
46
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
48
47
|
|
@@ -36,11 +36,10 @@ module ElasticsearchServerless
|
|
36
36
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html
|
37
37
|
#
|
38
38
|
def update_filtering_validation(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering_validation' }
|
40
40
|
|
41
|
-
defined_params = [:connector_id].
|
41
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
42
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
-
set_variables
|
44
43
|
end
|
45
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
45
|
|
@@ -33,14 +33,13 @@ module ElasticsearchServerless
|
|
33
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
34
|
# @option arguments [Hash] :body request body
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-index-name
|
37
37
|
#
|
38
38
|
def update_index_name(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_index_name' }
|
40
40
|
|
41
|
-
defined_params = [:connector_id].
|
41
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
42
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
-
set_variables
|
44
43
|
end
|
45
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
45
|
|
@@ -32,14 +32,13 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body request body
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-name
|
36
36
|
#
|
37
37
|
def update_name(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_name' }
|
39
39
|
|
40
|
-
defined_params = [:connector_id].
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
41
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
42
|
end
|
44
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
44
|
|
@@ -35,11 +35,10 @@ module ElasticsearchServerless
|
|
35
35
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html
|
36
36
|
#
|
37
37
|
def update_native(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_native' }
|
39
39
|
|
40
|
-
defined_params = [:connector_id].
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
41
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
42
|
end
|
44
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
44
|
|
@@ -33,14 +33,13 @@ module ElasticsearchServerless
|
|
33
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
34
|
# @option arguments [Hash] :body request body
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-pipeline
|
37
37
|
#
|
38
38
|
def update_pipeline(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_pipeline' }
|
40
40
|
|
41
|
-
defined_params = [:connector_id].
|
41
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
42
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
-
set_variables
|
44
43
|
end
|
45
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
45
|
|
@@ -32,14 +32,13 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body request body
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-scheduling
|
36
36
|
#
|
37
37
|
def update_scheduling(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_scheduling' }
|
39
39
|
|
40
|
-
defined_params = [:connector_id].
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
41
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
42
|
end
|
44
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
44
|
|
@@ -32,14 +32,13 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body request body
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-service-type
|
36
36
|
#
|
37
37
|
def update_service_type(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_service_type' }
|
39
39
|
|
40
|
-
defined_params = [:connector_id].
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
41
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
42
|
end
|
44
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
44
|
|
@@ -32,14 +32,13 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body request body
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-status
|
36
36
|
#
|
37
37
|
def update_status(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_status' }
|
39
39
|
|
40
|
-
defined_params = [:connector_id].
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
41
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
42
|
end
|
44
43
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
44
|
|
@@ -21,46 +21,57 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Count search results.
|
25
|
+
# Get the number of documents matching a query.
|
26
|
+
# The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
|
27
|
+
# The query is optional. When no query is provided, the API uses +match_all+ to count all the documents.
|
28
|
+
# The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.
|
29
|
+
# The operation is broadcast across all shards.
|
30
|
+
# For each shard ID group, a replica is chosen and the search is run against it.
|
31
|
+
# This means that replicas increase the scalability of the count.
|
25
32
|
#
|
26
|
-
# @option arguments [String, Array] :index
|
27
|
-
#
|
33
|
+
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search.
|
34
|
+
# It supports wildcards (+*+).
|
28
35
|
# To search all data streams and indices, omit this parameter or use +*+ or +_all+.
|
29
36
|
# @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
|
30
|
-
# This behavior applies even if the request targets other open indices.
|
31
|
-
#
|
32
|
-
#
|
37
|
+
# This behavior applies even if the request targets other open indices.
|
38
|
+
# For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
|
39
|
+
# @option arguments [String] :analyzer The analyzer to use for the query string.
|
40
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
33
41
|
# @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
|
34
|
-
# This parameter can
|
42
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
35
43
|
# @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+.
|
36
|
-
# This parameter can
|
37
|
-
# @option arguments [String] :df
|
38
|
-
# This parameter can
|
39
|
-
# @option arguments [String, Array<String>] :expand_wildcards
|
44
|
+
# This parameter can be used only when the +q+ query string parameter is specified. Server default: OR.
|
45
|
+
# @option arguments [String] :df The field to use as a default when no field prefix is given in the query string.
|
46
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
47
|
+
# @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
|
40
48
|
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
41
|
-
#
|
42
|
-
# @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices are ignored when frozen. Server default: true.
|
49
|
+
# It supports comma-separated values, such as +open,hidden+. Server default: open.
|
50
|
+
# @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded, or aliased indices are ignored when frozen. Server default: true.
|
43
51
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
44
52
|
# @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
|
45
|
-
#
|
46
|
-
# @option arguments [
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# @option arguments [
|
53
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
54
|
+
# @option arguments [Float] :min_score The minimum +_score+ value that documents must have to be included in the result.
|
55
|
+
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
56
|
+
# By default, it is random.
|
57
|
+
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
58
|
+
# @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard.
|
50
59
|
# If a query reaches this limit, Elasticsearch terminates the query early.
|
51
|
-
# Elasticsearch collects documents before sorting.
|
52
|
-
#
|
60
|
+
# Elasticsearch collects documents before sorting.IMPORTANT: Use with caution.
|
61
|
+
# Elasticsearch applies this parameter to each shard handling the request.
|
62
|
+
# When possible, let Elasticsearch perform early termination automatically.
|
63
|
+
# Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
|
64
|
+
# @option arguments [String] :q The query in Lucene query string syntax. This parameter cannot be used with a request body.
|
53
65
|
# @option arguments [Hash] :headers Custom HTTP headers
|
54
66
|
# @option arguments [Hash] :body request body
|
55
67
|
#
|
56
|
-
# @see https://www.elastic.co/
|
68
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-count
|
57
69
|
#
|
58
70
|
def count(arguments = {})
|
59
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
71
|
+
request_opts = { endpoint: arguments[:endpoint] || 'count' }
|
60
72
|
|
61
|
-
defined_params = [:index].
|
73
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
62
74
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
63
|
-
set_variables
|
64
75
|
end
|
65
76
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
66
77
|
|
@@ -80,7 +91,7 @@ module ElasticsearchServerless
|
|
80
91
|
path = if _index
|
81
92
|
"#{Utils.listify(_index)}/_count"
|
82
93
|
else
|
83
|
-
|
94
|
+
'_count'
|
84
95
|
end
|
85
96
|
params = Utils.process_params(arguments)
|
86
97
|
|