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
@@ -22,19 +22,19 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Eql
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Get the async EQL status.
|
26
|
+
# Get the current status for an async EQL search or a stored synchronous EQL search without returning results.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :id Identifier for the search. (*Required*)
|
28
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
30
|
#
|
30
|
-
# @see https://www.elastic.co/
|
31
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status
|
31
32
|
#
|
32
33
|
def get_status(arguments = {})
|
33
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || 'eql.get_status' }
|
34
35
|
|
35
|
-
defined_params = [:id].
|
36
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
36
37
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
-
set_variables
|
38
38
|
end
|
39
39
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
40
|
|
@@ -22,10 +22,15 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Eql
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Get EQL search results.
|
26
|
+
# Returns search results for an Event Query Language (EQL) query.
|
27
|
+
# EQL assumes each document in a data stream or index corresponds to an event.
|
26
28
|
#
|
27
29
|
# @option arguments [String, Array] :index The name of the index to scope the operation (*Required*)
|
28
30
|
# @option arguments [Boolean] :allow_no_indices [TODO] Server default: true.
|
31
|
+
# @option arguments [Boolean] :allow_partial_search_results If true, returns partial results if there are shard failures. If false, returns an error with no partial results. Server default: true.
|
32
|
+
# @option arguments [Boolean] :allow_partial_sequence_results If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.
|
33
|
+
# This flag has effect only if allow_partial_search_results is true.
|
29
34
|
# @option arguments [String, Array<String>] :expand_wildcards [TODO] Server default: open.
|
30
35
|
# @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response. Server default: true.
|
31
36
|
# @option arguments [Time] :keep_alive Period for which the search and its results are stored on the cluster. Server default: 5d.
|
@@ -34,14 +39,13 @@ module ElasticsearchServerless
|
|
34
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
40
|
# @option arguments [Hash] :body request body
|
36
41
|
#
|
37
|
-
# @see https://www.elastic.co/
|
42
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search
|
38
43
|
#
|
39
44
|
def search(arguments = {})
|
40
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
45
|
+
request_opts = { endpoint: arguments[:endpoint] || 'eql.search' }
|
41
46
|
|
42
|
-
defined_params = [:index].
|
47
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
43
48
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
44
|
-
set_variables
|
45
49
|
end
|
46
50
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
47
51
|
|
@@ -22,35 +22,54 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Check a document.
|
25
|
-
#
|
25
|
+
# Verify that a document exists.
|
26
|
+
# For example, check to see if a document with the +_id+ 0 exists:
|
27
|
+
# +
|
28
|
+
# HEAD my-index-000001/_doc/0
|
29
|
+
# +
|
30
|
+
# If the document exists, the API returns a status code of +200 - OK+.
|
31
|
+
# If the document doesn’t exist, the API returns +404 - Not Found+.
|
32
|
+
# **Versioning support**
|
33
|
+
# You can use the +version+ parameter to check the document only if its current version is equal to the specified one.
|
34
|
+
# Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
|
35
|
+
# The old version of the document doesn't disappear immediately, although you won't be able to access it.
|
36
|
+
# Elasticsearch cleans up deleted documents in the background as you continue to index more data.
|
26
37
|
#
|
27
|
-
# @option arguments [String] :id
|
28
|
-
# @option arguments [String] :index
|
29
|
-
#
|
30
|
-
# @option arguments [String] :preference
|
31
|
-
#
|
38
|
+
# @option arguments [String] :id A unique document identifier. (*Required*)
|
39
|
+
# @option arguments [String] :index A comma-separated list of data streams, indices, and aliases.
|
40
|
+
# It supports wildcards (+*+). (*Required*)
|
41
|
+
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
42
|
+
# By default, the operation is randomized between the shard replicas.If it is set to +_local+, the operation will prefer to be run on a local allocated shard when possible.
|
43
|
+
# If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.
|
44
|
+
# This can help with "jumping values" when hitting different shards in different refresh states.
|
45
|
+
# A sample value can be something like the web session ID or the user name.
|
32
46
|
# @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
|
33
|
-
# @option arguments [Boolean] :refresh If +true+,
|
34
|
-
#
|
35
|
-
# @option arguments [
|
36
|
-
# @option arguments [String, Array<String>] :
|
47
|
+
# @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document.
|
48
|
+
# Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
|
49
|
+
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
50
|
+
# @option arguments [Boolean, String, Array<String>] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return.
|
51
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
52
|
+
# You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter.
|
53
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
37
54
|
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
38
|
-
#
|
55
|
+
# If this parameter is specified, only these source fields are returned.
|
56
|
+
# You can exclude fields from this subset using the +_source_excludes+ query parameter.
|
57
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
58
|
+
# @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return as part of a hit.
|
39
59
|
# If no fields are specified, no stored fields are included in the response.
|
40
|
-
# If this field is specified, the +_source+ parameter defaults to false
|
60
|
+
# If this field is specified, the +_source+ parameter defaults to +false+.
|
41
61
|
# @option arguments [Integer] :version Explicit version number for concurrency control.
|
42
62
|
# The specified version must match the current version of the document for the request to succeed.
|
43
|
-
# @option arguments [String] :version_type
|
63
|
+
# @option arguments [String] :version_type The version type.
|
44
64
|
# @option arguments [Hash] :headers Custom HTTP headers
|
45
65
|
#
|
46
|
-
# @see https://www.elastic.co/
|
66
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get
|
47
67
|
#
|
48
68
|
def exists(arguments = {})
|
49
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
69
|
+
request_opts = { endpoint: arguments[:endpoint] || 'exists' }
|
50
70
|
|
51
|
-
defined_params = [:index, :id].
|
71
|
+
defined_params = [:index, :id].each_with_object({}) do |variable, set_variables|
|
52
72
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
53
|
-
set_variables
|
54
73
|
end
|
55
74
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
56
75
|
|
@@ -71,11 +90,11 @@ module ElasticsearchServerless
|
|
71
90
|
params = Utils.process_params(arguments)
|
72
91
|
|
73
92
|
Utils.rescue_from_not_found do
|
74
|
-
perform_request(method, path, params, body, headers, request_opts).status == 200
|
93
|
+
perform_request(method, path, params, body, headers, request_opts).status == 200
|
75
94
|
end
|
76
95
|
end
|
77
96
|
|
78
|
-
|
97
|
+
alias exists? exists
|
79
98
|
end
|
80
99
|
end
|
81
100
|
end
|
@@ -22,32 +22,37 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Check for a document source.
|
25
|
-
#
|
25
|
+
# Check whether a document source exists in an index.
|
26
|
+
# For example:
|
27
|
+
# +
|
28
|
+
# HEAD my-index-000001/_source/1
|
29
|
+
# +
|
30
|
+
# A document's source is not available if it is disabled in the mapping.
|
26
31
|
#
|
27
|
-
# @option arguments [String] :id
|
28
|
-
# @option arguments [String] :index
|
29
|
-
#
|
30
|
-
# @option arguments [String] :preference
|
31
|
-
#
|
32
|
-
# @option arguments [Boolean] :realtime If true
|
33
|
-
# @option arguments [Boolean] :refresh If +true+,
|
34
|
-
#
|
35
|
-
# @option arguments [
|
32
|
+
# @option arguments [String] :id A unique identifier for the document. (*Required*)
|
33
|
+
# @option arguments [String] :index A comma-separated list of data streams, indices, and aliases.
|
34
|
+
# It supports wildcards (+*+). (*Required*)
|
35
|
+
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
36
|
+
# By default, the operation is randomized between the shard replicas.
|
37
|
+
# @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
|
38
|
+
# @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document.
|
39
|
+
# Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
|
40
|
+
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
41
|
+
# @option arguments [Boolean, String, Array<String>] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return.
|
36
42
|
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude in the response.
|
37
43
|
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
38
|
-
# @option arguments [Integer] :version
|
39
|
-
#
|
40
|
-
# @option arguments [String] :version_type
|
44
|
+
# @option arguments [Integer] :version The version number for concurrency control.
|
45
|
+
# It must match the current version of the document for the request to succeed.
|
46
|
+
# @option arguments [String] :version_type The version type.
|
41
47
|
# @option arguments [Hash] :headers Custom HTTP headers
|
42
48
|
#
|
43
|
-
# @see https://www.elastic.co/
|
49
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get
|
44
50
|
#
|
45
51
|
def exists_source(arguments = {})
|
46
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
52
|
+
request_opts = { endpoint: arguments[:endpoint] || 'exists_source' }
|
47
53
|
|
48
|
-
defined_params = [:index, :id].
|
54
|
+
defined_params = [:index, :id].each_with_object({}) do |variable, set_variables|
|
49
55
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
50
|
-
set_variables
|
51
56
|
end
|
52
57
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
53
58
|
|
@@ -72,7 +77,7 @@ module ElasticsearchServerless
|
|
72
77
|
)
|
73
78
|
end
|
74
79
|
|
75
|
-
|
80
|
+
alias exists_source? exists_source
|
76
81
|
end
|
77
82
|
end
|
78
83
|
end
|
@@ -22,36 +22,45 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Explain a document match result.
|
25
|
-
#
|
25
|
+
# Get information about why a specific document matches, or doesn't match, a query.
|
26
|
+
# It computes a score explanation for a query and a specific document.
|
26
27
|
#
|
27
|
-
# @option arguments [String] :id
|
28
|
-
# @option arguments [String] :index Index names used to limit the request.
|
28
|
+
# @option arguments [String] :id The document identifier. (*Required*)
|
29
|
+
# @option arguments [String] :index Index names that are used to limit the request.
|
29
30
|
# Only a single index name can be provided to this parameter. (*Required*)
|
30
|
-
# @option arguments [String] :analyzer
|
31
|
-
# This parameter can
|
31
|
+
# @option arguments [String] :analyzer The analyzer to use for the query string.
|
32
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
32
33
|
# @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
|
33
|
-
#
|
34
|
-
# @option arguments [String] :
|
34
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
35
|
+
# @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+.
|
36
|
+
# This parameter can be used only when the +q+ query string parameter is specified. Server default: OR.
|
37
|
+
# @option arguments [String] :df The field to use as default where no field prefix is given in the query string.
|
38
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
35
39
|
# @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.
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
# @option arguments [
|
40
|
+
# This parameter can be used only when the +q+ query string parameter is specified.
|
41
|
+
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
42
|
+
# It is random by default.
|
43
|
+
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
44
|
+
# @option arguments [Boolean, String, Array<String>] :_source +True+ or +false+ to return the +_source+ field or not or a list of fields to return.
|
40
45
|
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
46
|
+
# You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter.
|
47
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
41
48
|
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
49
|
+
# If this parameter is specified, only these source fields are returned.
|
50
|
+
# You can exclude fields from this subset using the +_source_excludes+ query parameter.
|
51
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
42
52
|
# @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return in the response.
|
43
|
-
# @option arguments [String] :q
|
53
|
+
# @option arguments [String] :q The query in the Lucene query string syntax.
|
44
54
|
# @option arguments [Hash] :headers Custom HTTP headers
|
45
55
|
# @option arguments [Hash] :body request body
|
46
56
|
#
|
47
|
-
# @see https://www.elastic.co/
|
57
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-explain
|
48
58
|
#
|
49
59
|
def explain(arguments = {})
|
50
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
60
|
+
request_opts = { endpoint: arguments[:endpoint] || 'explain' }
|
51
61
|
|
52
|
-
defined_params = [:index, :id].
|
62
|
+
defined_params = [:index, :id].each_with_object({}) do |variable, set_variables|
|
53
63
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
54
|
-
set_variables
|
55
64
|
end
|
56
65
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
57
66
|
|
@@ -21,32 +21,35 @@
|
|
21
21
|
module ElasticsearchServerless
|
22
22
|
module API
|
23
23
|
module Actions
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
24
|
+
# Get the field capabilities.
|
25
|
+
# Get information about the capabilities of fields among multiple indices.
|
26
|
+
# For data streams, the API returns field capabilities among the stream’s backing indices.
|
27
|
+
# It returns runtime fields like any other field.
|
28
|
+
# For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the +keyword+ family.
|
27
29
|
#
|
28
|
-
# @option arguments [String, Array] :index
|
30
|
+
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.
|
29
31
|
# @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias,
|
30
32
|
# or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request
|
31
33
|
# targeting +foo*,bar*+ returns an error if an index starts with foo but no index starts with bar. Server default: true.
|
32
|
-
# @option arguments [String, Array<String>] :expand_wildcards
|
33
|
-
# @option arguments [String, Array<String>] :fields
|
34
|
+
# @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Server default: open.
|
35
|
+
# @option arguments [String, Array<String>] :fields A comma-separated list of fields to retrieve capabilities for. Wildcard (+*+) expressions are supported.
|
34
36
|
# @option arguments [Boolean] :ignore_unavailable If +true+, missing or closed indices are not included in the response.
|
35
37
|
# @option arguments [Boolean] :include_unmapped If true, unmapped fields are included in the response.
|
36
|
-
# @option arguments [String] :filters
|
37
|
-
# @option arguments [Array<String>] :types
|
38
|
+
# @option arguments [String] :filters A comma-separated list of filters to apply to the response.
|
39
|
+
# @option arguments [Array<String>] :types A comma-separated list of field types to include.
|
40
|
+
# Any fields that do not match one of these types will be excluded from the results.
|
41
|
+
# It defaults to empty, meaning that all field types are returned.
|
38
42
|
# @option arguments [Boolean] :include_empty_fields If false, empty fields are not included in the response. Server default: true.
|
39
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
40
44
|
# @option arguments [Hash] :body request body
|
41
45
|
#
|
42
|
-
# @see https://www.elastic.co/
|
46
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps
|
43
47
|
#
|
44
48
|
def field_caps(arguments = {})
|
45
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
49
|
+
request_opts = { endpoint: arguments[:endpoint] || 'field_caps' }
|
46
50
|
|
47
|
-
defined_params = [:index].
|
51
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
48
52
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
49
|
-
set_variables
|
50
53
|
end
|
51
54
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
52
55
|
|
@@ -66,7 +69,7 @@ module ElasticsearchServerless
|
|
66
69
|
path = if _index
|
67
70
|
"#{Utils.listify(_index)}/_field_caps"
|
68
71
|
else
|
69
|
-
|
72
|
+
'_field_caps'
|
70
73
|
end
|
71
74
|
params = Utils.process_params(arguments)
|
72
75
|
|
@@ -22,35 +22,85 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Get a document by its ID.
|
25
|
-
#
|
25
|
+
# Get a document and its source or stored fields from an index.
|
26
|
+
# By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).
|
27
|
+
# In the case where stored fields are requested with the +stored_fields+ parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.
|
28
|
+
# To turn off realtime behavior, set the +realtime+ parameter to false.
|
29
|
+
# **Source filtering**
|
30
|
+
# By default, the API returns the contents of the +_source+ field unless you have used the +stored_fields+ parameter or the +_source+ field is turned off.
|
31
|
+
# You can turn off +_source+ retrieval by using the +_source+ parameter:
|
32
|
+
# +
|
33
|
+
# GET my-index-000001/_doc/0?_source=false
|
34
|
+
# +
|
35
|
+
# If you only need one or two fields from the +_source+, use the +_source_includes+ or +_source_excludes+ parameters to include or filter out particular fields.
|
36
|
+
# This can be helpful with large documents where partial retrieval can save on network overhead
|
37
|
+
# Both parameters take a comma separated list of fields or wildcard expressions.
|
38
|
+
# For example:
|
39
|
+
# +
|
40
|
+
# GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities
|
41
|
+
# +
|
42
|
+
# If you only want to specify includes, you can use a shorter notation:
|
43
|
+
# +
|
44
|
+
# GET my-index-000001/_doc/0?_source=*.id
|
45
|
+
# +
|
46
|
+
# **Routing**
|
47
|
+
# If routing is used during indexing, the routing value also needs to be specified to retrieve a document.
|
48
|
+
# For example:
|
49
|
+
# +
|
50
|
+
# GET my-index-000001/_doc/2?routing=user1
|
51
|
+
# +
|
52
|
+
# This request gets the document with ID 2, but it is routed based on the user.
|
53
|
+
# The document is not fetched if the correct routing is not specified.
|
54
|
+
# **Distributed**
|
55
|
+
# The GET operation is hashed into a specific shard ID.
|
56
|
+
# It is then redirected to one of the replicas within that shard ID and returns the result.
|
57
|
+
# The replicas are the primary shard and its replicas within that shard ID group.
|
58
|
+
# This means that the more replicas you have, the better your GET scaling will be.
|
59
|
+
# **Versioning support**
|
60
|
+
# You can use the +version+ parameter to retrieve the document only if its current version is equal to the specified one.
|
61
|
+
# Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
|
62
|
+
# The old version of the document doesn't disappear immediately, although you won't be able to access it.
|
63
|
+
# Elasticsearch cleans up deleted documents in the background as you continue to index more data.
|
26
64
|
#
|
27
|
-
# @option arguments [String] :id
|
28
|
-
# @option arguments [String] :index
|
29
|
-
# @option arguments [Boolean] :force_synthetic_source
|
30
|
-
# Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
|
31
|
-
# Fetches with this enabled will be slower
|
32
|
-
# @option arguments [String] :preference
|
65
|
+
# @option arguments [String] :id A unique document identifier. (*Required*)
|
66
|
+
# @option arguments [String] :index The name of the index that contains the document. (*Required*)
|
67
|
+
# @option arguments [Boolean] :force_synthetic_source Indicates whether the request forces synthetic +_source+.
|
68
|
+
# Use this paramater to test if the mapping supports synthetic +_source+ and to get a sense of the worst case performance.
|
69
|
+
# Fetches with this parameter enabled will be slower than enabling synthetic source natively in the index.
|
70
|
+
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
71
|
+
# By default, the operation is randomized between the shard replicas.If it is set to +_local+, the operation will prefer to be run on a local allocated shard when possible.
|
72
|
+
# If it is set to a custom value, the value is used to guarantee that the same shards will be used for the same custom value.
|
73
|
+
# This can help with "jumping values" when hitting different shards in different refresh states.
|
74
|
+
# A sample value can be something like the web session ID or the user name.
|
33
75
|
# @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
|
34
|
-
# @option arguments [Boolean] :refresh If true
|
35
|
-
#
|
36
|
-
# @option arguments [
|
37
|
-
# @option arguments [String, Array<String>] :
|
76
|
+
# @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document.
|
77
|
+
# Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
|
78
|
+
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
79
|
+
# @option arguments [Boolean, String, Array<String>] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return.
|
80
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
|
81
|
+
# You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter.
|
82
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
38
83
|
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
39
|
-
#
|
84
|
+
# If this parameter is specified, only these source fields are returned.
|
85
|
+
# You can exclude fields from this subset using the +_source_excludes+ query parameter.
|
86
|
+
# If the +_source+ parameter is +false+, this parameter is ignored.
|
87
|
+
# @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return as part of a hit.
|
40
88
|
# If no fields are specified, no stored fields are included in the response.
|
41
|
-
# If this field is specified, the +_source+ parameter defaults to false
|
42
|
-
#
|
43
|
-
#
|
89
|
+
# If this field is specified, the +_source+ parameter defaults to +false+.
|
90
|
+
# Only leaf fields can be retrieved with the +stored_field+ option.
|
91
|
+
# Object fields can't be returned;if specified, the request fails.
|
92
|
+
# @option arguments [Integer] :version The version number for concurrency control.
|
93
|
+
# It must match the current version of the document for the request to succeed.
|
94
|
+
# @option arguments [String] :version_type The version type.
|
44
95
|
# @option arguments [Hash] :headers Custom HTTP headers
|
45
96
|
#
|
46
|
-
# @see https://www.elastic.co/
|
97
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get
|
47
98
|
#
|
48
99
|
def get(arguments = {})
|
49
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
100
|
+
request_opts = { endpoint: arguments[:endpoint] || 'get' }
|
50
101
|
|
51
|
-
defined_params = [:index, :id].
|
102
|
+
defined_params = [:index, :id].each_with_object({}) do |variable, set_variables|
|
52
103
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
53
|
-
set_variables
|
54
104
|
end
|
55
105
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
56
106
|
|
@@ -71,11 +121,11 @@ module ElasticsearchServerless
|
|
71
121
|
params = Utils.process_params(arguments)
|
72
122
|
|
73
123
|
if Array(arguments[:ignore]).include?(404)
|
74
|
-
Utils.rescue_from_not_found
|
124
|
+
Utils.rescue_from_not_found do
|
75
125
|
ElasticsearchServerless::API::Response.new(
|
76
126
|
perform_request(method, path, params, body, headers, request_opts)
|
77
127
|
)
|
78
|
-
|
128
|
+
end
|
79
129
|
else
|
80
130
|
ElasticsearchServerless::API::Response.new(
|
81
131
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -24,18 +24,19 @@ module ElasticsearchServerless
|
|
24
24
|
# Get a script or search template.
|
25
25
|
# Retrieves a stored script or search template.
|
26
26
|
#
|
27
|
-
# @option arguments [String] :id
|
28
|
-
# @option arguments [Time] :master_timeout
|
27
|
+
# @option arguments [String] :id The identifier for the stored script or search template. (*Required*)
|
28
|
+
# @option arguments [Time] :master_timeout The period to wait for the master node.
|
29
|
+
# If the master node is not available before the timeout expires, the request fails and returns an error.
|
30
|
+
# It can also be set to +-1+ to indicate that the request should never timeout. Server default: .
|
29
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
32
|
#
|
31
|
-
# @see https://www.elastic.co/
|
33
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script
|
32
34
|
#
|
33
35
|
def get_script(arguments = {})
|
34
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || 'get_script' }
|
35
37
|
|
36
|
-
defined_params = [:id].
|
38
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
37
39
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
-
set_variables
|
39
40
|
end
|
40
41
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
42
|
|
@@ -22,30 +22,40 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Get a document's source.
|
25
|
-
#
|
25
|
+
# Get the source of a document.
|
26
|
+
# For example:
|
27
|
+
# +
|
28
|
+
# GET my-index-000001/_source/1
|
29
|
+
# +
|
30
|
+
# You can use the source filtering parameters to control which parts of the +_source+ are returned:
|
31
|
+
# +
|
32
|
+
# GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities
|
33
|
+
# +
|
26
34
|
#
|
27
|
-
# @option arguments [String] :id
|
28
|
-
# @option arguments [String] :index
|
29
|
-
# @option arguments [String] :preference
|
30
|
-
#
|
31
|
-
# @option arguments [Boolean] :
|
32
|
-
# @option arguments [
|
33
|
-
#
|
35
|
+
# @option arguments [String] :id A unique document identifier. (*Required*)
|
36
|
+
# @option arguments [String] :index The name of the index that contains the document. (*Required*)
|
37
|
+
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
38
|
+
# By default, the operation is randomized between the shard replicas.
|
39
|
+
# @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
|
40
|
+
# @option arguments [Boolean] :refresh If +true+, the request refreshes the relevant shards before retrieving the document.
|
41
|
+
# Setting it to +true+ should be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).
|
42
|
+
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
43
|
+
# @option arguments [Boolean, String, Array<String>] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or lists the fields to return.
|
34
44
|
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude in the response.
|
35
45
|
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
36
|
-
# @option arguments [String, Array<String>] :stored_fields
|
37
|
-
# @option arguments [Integer] :version
|
38
|
-
#
|
46
|
+
# @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return as part of a hit.
|
47
|
+
# @option arguments [Integer] :version The version number for concurrency control.
|
48
|
+
# It must match the current version of the document for the request to succeed.
|
49
|
+
# @option arguments [String] :version_type The version type.
|
39
50
|
# @option arguments [Hash] :headers Custom HTTP headers
|
40
51
|
#
|
41
|
-
# @see https://www.elastic.co/
|
52
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get
|
42
53
|
#
|
43
54
|
def get_source(arguments = {})
|
44
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
55
|
+
request_opts = { endpoint: arguments[:endpoint] || 'get_source' }
|
45
56
|
|
46
|
-
defined_params = [:index, :id].
|
57
|
+
defined_params = [:index, :id].each_with_object({}) do |variable, set_variables|
|
47
58
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
48
|
-
set_variables
|
49
59
|
end
|
50
60
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
51
61
|
|
@@ -22,7 +22,12 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Graph
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Explore graph analytics.
|
26
|
+
# Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.
|
27
|
+
# The easiest way to understand the behavior of this API is to use the Graph UI to explore connections.
|
28
|
+
# An initial request to the +_explore+ API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph.
|
29
|
+
# Subsequent requests enable you to spider out from one more vertices of interest.
|
30
|
+
# You can exclude vertices that have already been returned.
|
26
31
|
#
|
27
32
|
# @option arguments [String, Array] :index Name of the index. (*Required*)
|
28
33
|
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
@@ -32,14 +37,13 @@ module ElasticsearchServerless
|
|
32
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
38
|
# @option arguments [Hash] :body request body
|
34
39
|
#
|
35
|
-
# @see https://www.elastic.co/
|
40
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-graph
|
36
41
|
#
|
37
42
|
def explore(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
43
|
+
request_opts = { endpoint: arguments[:endpoint] || 'graph.explore' }
|
39
44
|
|
40
|
-
defined_params = [:index].
|
45
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
41
46
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
47
|
end
|
44
48
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
49
|
|