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
@@ -21,21 +21,21 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Render a search template.
|
25
|
+
# Render a search template as a search request body.
|
25
26
|
#
|
26
|
-
# @option arguments [String] :id ID of the search template to render.
|
27
|
+
# @option arguments [String] :id The ID of the search template to render.
|
27
28
|
# If no +source+ is specified, this or the +id+ request body parameter is required.
|
28
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
30
|
# @option arguments [Hash] :body request body
|
30
31
|
#
|
31
|
-
# @see https://www.elastic.co/
|
32
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template
|
32
33
|
#
|
33
34
|
def render_search_template(arguments = {})
|
34
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'render_search_template' }
|
35
36
|
|
36
|
-
defined_params = [:id].
|
37
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
37
38
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
-
set_variables
|
39
39
|
end
|
40
40
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
41
|
|
@@ -55,7 +55,7 @@ module ElasticsearchServerless
|
|
55
55
|
path = if _id
|
56
56
|
"_render/template/#{Utils.listify(_id)}"
|
57
57
|
else
|
58
|
-
|
58
|
+
'_render/template'
|
59
59
|
end
|
60
60
|
params = {}
|
61
61
|
|
@@ -21,7 +21,7 @@ module ElasticsearchServerless
|
|
21
21
|
# the initializer and behaves like a Hash, except when status or headers are called upon it, in
|
22
22
|
# which case it returns the original object's status and headers.
|
23
23
|
class Response
|
24
|
-
RESPONSE_METHODS = [:status, :body, :headers]
|
24
|
+
RESPONSE_METHODS = [:status, :body, :headers].freeze
|
25
25
|
|
26
26
|
def initialize(response)
|
27
27
|
@response = response
|
@@ -23,6 +23,10 @@ module ElasticsearchServerless
|
|
23
23
|
module Actions
|
24
24
|
# Run a script.
|
25
25
|
# Runs a script and returns a result.
|
26
|
+
# Use this API to build and test scripts, such as when defining a script for a runtime field.
|
27
|
+
# This API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.
|
28
|
+
# The API uses several _contexts_, which control how scripts are run, what variables are available at runtime, and what the return type is.
|
29
|
+
# Each context requires a script, but additional parameters depend on the context you're using for that script.
|
26
30
|
# This functionality is Experimental and may be changed or removed
|
27
31
|
# completely in a future release. Elastic will take a best effort approach
|
28
32
|
# to fix any issues, but experimental features are not subject to the
|
@@ -31,10 +35,10 @@ module ElasticsearchServerless
|
|
31
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
36
|
# @option arguments [Hash] :body request body
|
33
37
|
#
|
34
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/painless/
|
38
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html
|
35
39
|
#
|
36
40
|
def scripts_painless_execute(arguments = {})
|
37
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || 'scripts_painless_execute' }
|
38
42
|
|
39
43
|
arguments = arguments.clone
|
40
44
|
headers = arguments.delete(:headers) || {}
|
@@ -47,7 +51,7 @@ module ElasticsearchServerless
|
|
47
51
|
ElasticsearchServerless::API::HTTP_GET
|
48
52
|
end
|
49
53
|
|
50
|
-
path =
|
54
|
+
path = '_scripts/painless/_execute'
|
51
55
|
params = {}
|
52
56
|
|
53
57
|
ElasticsearchServerless::API::Response.new(
|
@@ -33,7 +33,7 @@ module ElasticsearchServerless
|
|
33
33
|
# IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.
|
34
34
|
#
|
35
35
|
# @option arguments [String] :scroll_id The scroll ID
|
36
|
-
# @option arguments [Time] :scroll
|
36
|
+
# @option arguments [Time] :scroll The period to retain the search context for scrolling. Server default: 1d.
|
37
37
|
# @option arguments [Boolean] :rest_total_hits_as_int If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object.
|
38
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
39
39
|
# @option arguments [Hash] :body request body
|
@@ -43,10 +43,10 @@ module ElasticsearchServerless
|
|
43
43
|
# Deprecated since version 7.0.0
|
44
44
|
#
|
45
45
|
#
|
46
|
-
# @see https://www.elastic.co/
|
46
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-scroll
|
47
47
|
#
|
48
48
|
def scroll(arguments = {})
|
49
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
49
|
+
request_opts = { endpoint: arguments[:endpoint] || 'scroll' }
|
50
50
|
|
51
51
|
arguments = arguments.clone
|
52
52
|
headers = arguments.delete(:headers) || {}
|
@@ -61,7 +61,7 @@ module ElasticsearchServerless
|
|
61
61
|
ElasticsearchServerless::API::HTTP_GET
|
62
62
|
end
|
63
63
|
|
64
|
-
path =
|
64
|
+
path = '_search/scroll'
|
65
65
|
params = Utils.process_params(arguments)
|
66
66
|
|
67
67
|
ElasticsearchServerless::API::Response.new(
|
@@ -21,103 +21,111 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
24
|
+
# Run a search.
|
25
|
+
# Get search hits that match the query defined in the request.
|
25
26
|
# You can provide search queries using the +q+ query string parameter or the request body.
|
26
27
|
# If both are specified, only the query parameter is used.
|
28
|
+
# If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.
|
29
|
+
# To search a point in time (PIT) for an alias, you must have the +read+ index privilege for the alias's data streams or indices.
|
30
|
+
# **Search slicing**
|
31
|
+
# When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the +slice+ and +pit+ properties.
|
32
|
+
# By default the splitting is done first on the shards, then locally on each shard.
|
33
|
+
# The local splitting partitions the shard into contiguous ranges based on Lucene document IDs.
|
34
|
+
# For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.
|
35
|
+
# IMPORTANT: The same point-in-time ID should be used for all slices.
|
36
|
+
# If different PIT IDs are used, slices can overlap and miss documents.
|
37
|
+
# This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.
|
27
38
|
#
|
28
|
-
# @option arguments [String, Array] :index
|
29
|
-
#
|
39
|
+
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search.
|
40
|
+
# It supports wildcards (+*+).
|
30
41
|
# To search all data streams and indices, omit this parameter or use +*+ or +_all+.
|
31
42
|
# @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.
|
32
43
|
# This behavior applies even if the request targets other open indices.
|
33
44
|
# 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.
|
34
|
-
# @option arguments [Boolean] :allow_partial_search_results If true
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
45
|
+
# @option arguments [Boolean] :allow_partial_search_results If +true+ and there are shard request timeouts or shard failures, the request returns partial results.
|
46
|
+
# If +false+, it returns an error with no partial results.To override the default behavior, you can set the +search.default_allow_partial_results+ cluster setting to +false+. Server default: true.
|
47
|
+
# @option arguments [String] :analyzer The analyzer to use for the query string.
|
48
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
49
|
+
# @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
|
50
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
39
51
|
# @option arguments [Integer] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node.
|
40
|
-
#
|
41
|
-
# @option arguments [Boolean] :ccs_minimize_roundtrips If true
|
42
|
-
# @option arguments [String] :default_operator The default operator for query string query: AND or OR
|
43
|
-
# This parameter can
|
44
|
-
# @option arguments [String] :df
|
45
|
-
# This parameter can
|
46
|
-
# @option arguments [String, Array<String>] :docvalue_fields A comma-separated list of fields to return as the docvalue representation for each hit.
|
47
|
-
# @option arguments [String, Array<String>] :expand_wildcards
|
52
|
+
# If the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request. Server default: 512.
|
53
|
+
# @option arguments [Boolean] :ccs_minimize_roundtrips If +true+, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests. Server default: true.
|
54
|
+
# @option arguments [String] :default_operator The default operator for the query string query: +AND+ or +OR+.
|
55
|
+
# This parameter can be used only when the +q+ query string parameter is specified. Server default: OR.
|
56
|
+
# @option arguments [String] :df The field to use as a default when no field prefix is given in the query string.
|
57
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
58
|
+
# @option arguments [String, Array<String>] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit.
|
59
|
+
# @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
|
48
60
|
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
49
|
-
#
|
50
|
-
# @option arguments [Boolean] :explain If +true+, returns detailed information about score computation as part of a hit.
|
61
|
+
# It supports comma-separated values such as +open,hidden+. Server default: open.
|
62
|
+
# @option arguments [Boolean] :explain If +true+, the request returns detailed information about score computation as part of a hit.
|
51
63
|
# @option arguments [Boolean] :ignore_throttled If +true+, concrete, expanded or aliased indices will be ignored when frozen. Server default: true.
|
52
64
|
# @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
|
53
|
-
# @option arguments [Boolean] :include_named_queries_score
|
54
|
-
# the name of the matched query associated with its score (true)
|
55
|
-
# or as an array containing the name of the matched queries (false)
|
56
|
-
# This functionality reruns each named query on every hit in a search response.
|
65
|
+
# @option arguments [Boolean] :include_named_queries_score If +true+, the response includes the score contribution from any named queries.This functionality reruns each named query on every hit in a search response.
|
57
66
|
# Typically, this adds a small overhead to a request.
|
58
67
|
# However, using computationally expensive named queries on a large number of hits may add significant overhead.
|
59
68
|
# @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.
|
60
|
-
# This parameter can
|
61
|
-
# @option arguments [Integer] :max_concurrent_shard_requests
|
69
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
70
|
+
# @option arguments [Integer] :max_concurrent_shard_requests The number of concurrent shard requests per node that the search runs concurrently.
|
62
71
|
# 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. Server default: 5.
|
63
|
-
# @option arguments [String] :
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
# +
|
68
|
-
# +
|
69
|
-
# +
|
70
|
-
# +
|
71
|
-
# +_shards:<shard>,<shard>+ to run the search only on the specified shards;
|
72
|
+
# @option arguments [String] :preference The nodes and shards used for the search.
|
73
|
+
# By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness.
|
74
|
+
# Valid values are:
|
75
|
+
# - +_only_local+ to run the search only on shards on the local node.
|
76
|
+
# - +_local+ to, if possible, run the search on shards on the local node, or if not, select shards using the default method.
|
77
|
+
# - +_only_nodes:<node-id>,<node-id>+ to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method.
|
78
|
+
# - +_prefer_nodes:<node-id>,<node-id>+ to if possible, run the search on the specified nodes IDs. If not, select shards using the default method.
|
79
|
+
# +_shards:<shard>,<shard>+ to run the search only on the specified shards. You can combine this value with other +preference+ values. However, the +_shards+ value must come first. For example: +_shards:2,3|_local+.
|
72
80
|
# +<custom-string>+ (any string that does not start with +_+) to route searches with the same +<custom-string>+ to the same shards in the same order.
|
73
|
-
# @option arguments [Integer] :pre_filter_shard_size
|
81
|
+
# @option arguments [Integer] :pre_filter_shard_size A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold.
|
74
82
|
# This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint).
|
75
83
|
# When unspecified, the pre-filter phase is executed if any of these conditions is met:
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
84
|
+
# - The request targets more than 128 shards.
|
85
|
+
# - The request targets one or more read-only index.
|
86
|
+
# - The primary sort of the query targets an indexed field.
|
79
87
|
# @option arguments [Boolean] :request_cache If +true+, the caching of search results is enabled for requests where +size+ is +0+.
|
80
|
-
#
|
81
|
-
# @option arguments [String] :routing
|
82
|
-
# @option arguments [Time] :scroll
|
88
|
+
# It defaults to index level settings.
|
89
|
+
# @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
|
90
|
+
# @option arguments [Time] :scroll The period to retain the search context for scrolling.
|
83
91
|
# By default, this value cannot exceed +1d+ (24 hours).
|
84
|
-
# You can change this limit using the +search.max_keep_alive+ cluster-level setting.
|
85
|
-
# @option arguments [String] :search_type
|
92
|
+
# You can change this limit by using the +search.max_keep_alive+ cluster-level setting.
|
93
|
+
# @option arguments [String] :search_type Indicates how distributed term frequencies are calculated for relevance scoring.
|
86
94
|
# @option arguments [Array<String>] :stats Specific +tag+ of the request for logging and statistical purposes.
|
87
95
|
# @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return as part of a hit.
|
88
96
|
# If no fields are specified, no stored fields are included in the response.
|
89
97
|
# If this field is specified, the +_source+ parameter defaults to +false+.
|
90
98
|
# You can pass +_source: true+ to return both source fields and stored fields in the search response.
|
91
|
-
# @option arguments [String] :suggest_field
|
92
|
-
# @option arguments [String] :suggest_mode
|
93
|
-
# This parameter can
|
94
|
-
# @option arguments [Integer] :suggest_size
|
95
|
-
# This parameter can
|
99
|
+
# @option arguments [String] :suggest_field The field to use for suggestions.
|
100
|
+
# @option arguments [String] :suggest_mode The suggest mode.
|
101
|
+
# This parameter can be used only when the +suggest_field+ and +suggest_text+ query string parameters are specified. Server default: missing.
|
102
|
+
# @option arguments [Integer] :suggest_size The number of suggestions to return.
|
103
|
+
# This parameter can be used only when the +suggest_field+ and +suggest_text+ query string parameters are specified.
|
96
104
|
# @option arguments [String] :suggest_text The source text for which the suggestions should be returned.
|
97
|
-
# This parameter can
|
98
|
-
# @option arguments [Integer] :terminate_after
|
105
|
+
# This parameter can be used only when the +suggest_field+ and +suggest_text+ query string parameters are specified.
|
106
|
+
# @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard.
|
99
107
|
# If a query reaches this limit, Elasticsearch terminates the query early.
|
100
|
-
# Elasticsearch collects documents before sorting.
|
101
|
-
# Use with caution.
|
108
|
+
# Elasticsearch collects documents before sorting.IMPORTANT: Use with caution.
|
102
109
|
# Elasticsearch applies this parameter to each shard handling the request.
|
103
110
|
# When possible, let Elasticsearch perform early termination automatically.
|
104
111
|
# Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
|
105
112
|
# If set to +0+ (default), the query does not terminate early. Server default: 0.
|
106
|
-
# @option arguments [Time] :timeout
|
113
|
+
# @option arguments [Time] :timeout The period of time to wait for a response from each shard.
|
107
114
|
# If no response is received before the timeout expires, the request fails and returns an error.
|
108
|
-
#
|
115
|
+
# It defaults to no timeout.
|
116
|
+
# @option arguments [Boolean, Integer] :track_total_hits The number of hits matching the query to count accurately.
|
109
117
|
# If +true+, the exact number of hits is returned at the cost of some performance.
|
110
118
|
# If +false+, the response does not include the total number of hits matching the query. Server default: 10000.
|
111
|
-
# @option arguments [Boolean] :track_scores If +true+,
|
112
|
-
# @option arguments [Boolean] :typed_keys If +true+, aggregation and suggester names are be prefixed by their respective types in the response.
|
119
|
+
# @option arguments [Boolean] :track_scores If +true+, the request calculates and returns document scores, even if the scores are not used for sorting.
|
120
|
+
# @option arguments [Boolean] :typed_keys If +true+, aggregation and suggester names are be prefixed by their respective types in the response.
|
113
121
|
# @option arguments [Boolean] :rest_total_hits_as_int Indicates whether +hits.total+ should be rendered as an integer or an object in the rest search response.
|
114
|
-
# @option arguments [Boolean] :version If +true+, returns document version as part of a hit.
|
115
|
-
# @option arguments [Boolean, String, Array<String>] :_source
|
122
|
+
# @option arguments [Boolean] :version If +true+, the request returns the document version as part of a hit.
|
123
|
+
# @option arguments [Boolean, String, Array<String>] :_source The source fields that are returned for matching documents.
|
116
124
|
# These fields are returned in the +hits._source+ property of the search response.
|
117
125
|
# Valid values are:
|
118
|
-
# +true+ to return the entire document source
|
119
|
-
# +false+ to not return the document source
|
120
|
-
# +<string>+ to return the source fields that are specified as a comma-separated list
|
126
|
+
# - +true+ to return the entire document source.
|
127
|
+
# - +false+ to not return the document source.
|
128
|
+
# - +<string>+ to return the source fields that are specified as a comma-separated list that supports wildcard (+*+) patterns. Server default: true.
|
121
129
|
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
122
130
|
# You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter.
|
123
131
|
# If the +_source+ parameter is +false+, this parameter is ignored.
|
@@ -125,31 +133,30 @@ module ElasticsearchServerless
|
|
125
133
|
# If this parameter is specified, only these source fields are returned.
|
126
134
|
# You can exclude fields from this subset using the +_source_excludes+ query parameter.
|
127
135
|
# If the +_source+ parameter is +false+, this parameter is ignored.
|
128
|
-
# @option arguments [Boolean] :seq_no_primary_term If +true+, returns sequence number and primary term of the last modification of each hit.
|
129
|
-
# @option arguments [String] :q
|
130
|
-
# Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
|
131
|
-
#
|
136
|
+
# @option arguments [Boolean] :seq_no_primary_term If +true+, the request returns the sequence number and primary term of the last modification of each hit.
|
137
|
+
# @option arguments [String] :q A query in the Lucene query string syntax.
|
138
|
+
# Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.IMPORTANT: This parameter overrides the query parameter in the request body.
|
139
|
+
# If both parameters are specified, documents matching the query request body parameter are not returned.
|
140
|
+
# @option arguments [Integer] :size The number of hits to return.
|
132
141
|
# By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters.
|
133
142
|
# To page through more hits, use the +search_after+ parameter. Server default: 10.
|
134
|
-
# @option arguments [Integer] :from
|
135
|
-
# Needs to be non-negative.
|
143
|
+
# @option arguments [Integer] :from The starting document offset, which must be non-negative.
|
136
144
|
# By default, you cannot page through more than 10,000 hits using the +from+ and +size+ parameters.
|
137
145
|
# To page through more hits, use the +search_after+ parameter. Server default: 0.
|
138
|
-
# @option arguments [String] :sort A comma-separated list of
|
146
|
+
# @option arguments [String] :sort A comma-separated list of +<field>:<direction>+ pairs.
|
139
147
|
# @option arguments [Boolean] :force_synthetic_source Should this request force synthetic _source?
|
140
148
|
# Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
|
141
149
|
# Fetches with this enabled will be slower the enabling synthetic source natively in the index.
|
142
150
|
# @option arguments [Hash] :headers Custom HTTP headers
|
143
151
|
# @option arguments [Hash] :body request body
|
144
152
|
#
|
145
|
-
# @see https://www.elastic.co/
|
153
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search
|
146
154
|
#
|
147
155
|
def search(arguments = {})
|
148
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
156
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search' }
|
149
157
|
|
150
|
-
defined_params = [:index].
|
158
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
151
159
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
152
|
-
set_variables
|
153
160
|
end
|
154
161
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
155
162
|
|
@@ -169,7 +176,7 @@ module ElasticsearchServerless
|
|
169
176
|
path = if _index
|
170
177
|
"#{Utils.listify(_index)}/_search"
|
171
178
|
else
|
172
|
-
|
179
|
+
'_search'
|
173
180
|
end
|
174
181
|
params = Utils.process_params(arguments)
|
175
182
|
|
@@ -29,17 +29,16 @@ module ElasticsearchServerless
|
|
29
29
|
# as-is with no warranties. Beta features are not subject to the support
|
30
30
|
# SLA of official GA features.
|
31
31
|
#
|
32
|
-
# @option arguments [String] :name The name of the search application to delete (*Required*)
|
32
|
+
# @option arguments [String] :name The name of the search application to delete. (*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-search-application-delete
|
36
36
|
#
|
37
37
|
def delete(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete' }
|
39
39
|
|
40
|
-
defined_params = [:name].
|
40
|
+
defined_params = [:name].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 [String] :name The name of the analytics collection to be deleted (*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-search-application-delete-behavioral-analytics
|
36
36
|
#
|
37
37
|
def delete_behavioral_analytics(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete_behavioral_analytics' }
|
39
39
|
|
40
|
-
defined_params = [:name].
|
40
|
+
defined_params = [:name].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
|
|
@@ -31,14 +31,13 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [String] :name The name of the search application (*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-search-application-get
|
35
35
|
#
|
36
36
|
def get(arguments = {})
|
37
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
37
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.get' }
|
38
38
|
|
39
|
-
defined_params = [:name].
|
39
|
+
defined_params = [:name].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
|
|
@@ -31,14 +31,13 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [Array<String>] :name A list of analytics collections to limit the returned information
|
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-search-application-get-behavioral-analytics
|
35
35
|
#
|
36
36
|
def get_behavioral_analytics(arguments = {})
|
37
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
37
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.get_behavioral_analytics' }
|
38
38
|
|
39
|
-
defined_params = [:name].
|
39
|
+
defined_params = [:name].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
|
|
@@ -53,7 +52,7 @@ module ElasticsearchServerless
|
|
53
52
|
path = if _name
|
54
53
|
"_application/analytics/#{Utils.listify(_name)}"
|
55
54
|
else
|
56
|
-
|
55
|
+
'_application/analytics'
|
57
56
|
end
|
58
57
|
params = {}
|
59
58
|
|
@@ -22,7 +22,8 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module SearchApplication
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Get search applications.
|
26
|
+
# Get information about search applications.
|
26
27
|
# This functionality is in Beta and is subject to change. The design and
|
27
28
|
# code is less mature than official GA features and is being provided
|
28
29
|
# as-is with no warranties. Beta features are not subject to the support
|
@@ -33,10 +34,10 @@ module ElasticsearchServerless
|
|
33
34
|
# @option arguments [Integer] :size Specifies a max number of results to get.
|
34
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
36
|
#
|
36
|
-
# @see https://www.elastic.co/
|
37
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics
|
37
38
|
#
|
38
39
|
def list(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.list' }
|
40
41
|
|
41
42
|
arguments = arguments.clone
|
42
43
|
headers = arguments.delete(:headers) || {}
|
@@ -44,7 +45,7 @@ module ElasticsearchServerless
|
|
44
45
|
body = nil
|
45
46
|
|
46
47
|
method = ElasticsearchServerless::API::HTTP_GET
|
47
|
-
path =
|
48
|
+
path = '_application/search_application'
|
48
49
|
params = Utils.process_params(arguments)
|
49
50
|
|
50
51
|
ElasticsearchServerless::API::Response.new(
|
@@ -33,14 +33,13 @@ module ElasticsearchServerless
|
|
33
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
34
|
# @option arguments [Hash] :body search_application
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put
|
37
37
|
#
|
38
38
|
def put(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.put' }
|
40
40
|
|
41
|
-
defined_params = [:name].
|
41
|
+
defined_params = [:name].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
|
|
@@ -31,14 +31,13 @@ module ElasticsearchServerless
|
|
31
31
|
# @option arguments [String] :name The name of the analytics collection to be created or updated. (*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-search-application-put-behavioral-analytics
|
35
35
|
#
|
36
36
|
def put_behavioral_analytics(arguments = {})
|
37
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
37
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.put_behavioral_analytics' }
|
38
38
|
|
39
|
-
defined_params = [:name].
|
39
|
+
defined_params = [:name].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
|
|
@@ -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-search-application-search
|
39
39
|
#
|
40
40
|
def search(arguments = {})
|
41
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || 'search_application.search' }
|
42
42
|
|
43
|
-
defined_params = [:name].
|
43
|
+
defined_params = [:name].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
|
|