elasticsearch-api 7.6.0 → 7.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/elasticsearch-api.gemspec +7 -2
- data/lib/elasticsearch/api/actions/bulk.rb +6 -3
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -4
- data/lib/elasticsearch/api/actions/cat/allocation.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/count.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/health.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/help.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/indices.rb +11 -5
- data/lib/elasticsearch/api/actions/cat/master.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/nodes.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/plugins.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/recovery.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/repositories.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/segments.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/shards.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/tasks.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/templates.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +6 -4
- data/lib/elasticsearch/api/actions/clear_scroll.rb +6 -4
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +45 -0
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +47 -0
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/health.rb +7 -4
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +49 -0
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/state.rb +7 -4
- data/lib/elasticsearch/api/actions/cluster/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/count.rb +8 -6
- data/lib/elasticsearch/api/actions/create.rb +2 -2
- data/lib/elasticsearch/api/actions/delete.rb +6 -3
- data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -5
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/actions/delete_script.rb +5 -3
- data/lib/elasticsearch/api/actions/exists.rb +5 -2
- data/lib/elasticsearch/api/actions/exists_source.rb +5 -2
- data/lib/elasticsearch/api/actions/explain.rb +5 -3
- data/lib/elasticsearch/api/actions/field_caps.rb +7 -5
- data/lib/elasticsearch/api/actions/get.rb +6 -3
- data/lib/elasticsearch/api/actions/get_script.rb +5 -3
- data/lib/elasticsearch/api/actions/get_script_context.rb +5 -3
- data/lib/elasticsearch/api/actions/get_script_languages.rb +5 -3
- data/lib/elasticsearch/api/actions/get_source.rb +5 -2
- data/lib/elasticsearch/api/actions/index.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/analyze.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/clone.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/close.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/create.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +37 -0
- data/lib/elasticsearch/api/actions/indices/delete.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +35 -0
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/flush.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/freeze.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/get.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_data_streams.rb +37 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_template.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/open.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +6 -3
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/put_template.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/recovery.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/refresh.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/rollover.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/segments.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/shrink.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/split.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/unfreeze.rb +4 -0
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +7 -5
- data/lib/elasticsearch/api/actions/info.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +6 -4
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -3
- data/lib/elasticsearch/api/actions/mget.rb +5 -3
- data/lib/elasticsearch/api/actions/msearch.rb +7 -4
- data/lib/elasticsearch/api/actions/msearch_template.rb +6 -3
- data/lib/elasticsearch/api/actions/mtermvectors.rb +6 -3
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/info.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +8 -5
- data/lib/elasticsearch/api/actions/nodes/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/usage.rb +6 -4
- data/lib/elasticsearch/api/actions/ping.rb +5 -3
- data/lib/elasticsearch/api/actions/put_script.rb +5 -3
- data/lib/elasticsearch/api/actions/rank_eval.rb +6 -3
- data/lib/elasticsearch/api/actions/reindex.rb +6 -4
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/actions/render_search_template.rb +6 -4
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +5 -3
- data/lib/elasticsearch/api/actions/scroll.rb +6 -4
- data/lib/elasticsearch/api/actions/search.rb +8 -6
- data/lib/elasticsearch/api/actions/search_shards.rb +7 -4
- data/lib/elasticsearch/api/actions/search_template.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +6 -5
- data/lib/elasticsearch/api/actions/snapshot/create.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/get.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +7 -5
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/status.rb +7 -5
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +5 -3
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +6 -4
- data/lib/elasticsearch/api/actions/tasks/get.rb +5 -3
- data/lib/elasticsearch/api/actions/tasks/list.rb +5 -3
- data/lib/elasticsearch/api/actions/termvectors.rb +5 -2
- data/lib/elasticsearch/api/actions/update.rb +6 -4
- data/lib/elasticsearch/api/actions/update_by_query.rb +7 -5
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +3 -3
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/create_document_spec.rb +8 -4
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/index_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +4 -0
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/mget_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +13 -8
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ping_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/reindex_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/search_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/update_document_spec.rb +2 -1
- data/spec/rest_yaml_tests_helper.rb +4 -0
- data/utils/thor/generator/endpoint_specifics.rb +1 -3
- data/utils/thor/generator/files_helper.rb +10 -0
- data/utils/thor/templates/_documentation_top.erb +3 -2
- data/utils/thor/templates/_perform_request.erb +6 -5
- data/utils/thor/templates/method.erb +2 -1
- metadata +14 -17
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +0 -28
- data/lib/elasticsearch/api/actions/benchmark.rb +0 -68
- data/lib/elasticsearch/api/actions/delete_by_rethrottle.rb +0 -34
- data/lib/elasticsearch/api/actions/nodes/shutdown.rb +0 -43
- data/lib/elasticsearch/api/actions/remote/info.rb +0 -24
- data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/benchmark_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +0 -63
- data/spec/elasticsearch/api/actions/remote/info_spec.rb +0 -22
@@ -17,7 +17,7 @@ module Elasticsearch
|
|
17
17
|
# @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
|
18
18
|
# @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
|
19
19
|
# @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
|
20
|
-
|
20
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
21
21
|
# @option arguments [Hash] :body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. (*Required*)
|
22
22
|
#
|
23
23
|
# *Deprecation notice*:
|
@@ -25,11 +25,13 @@ module Elasticsearch
|
|
25
25
|
# Deprecated since version 7.0.0
|
26
26
|
#
|
27
27
|
#
|
28
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
28
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-multi-get.html
|
29
29
|
#
|
30
30
|
def mget(arguments = {})
|
31
31
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
32
32
|
|
33
|
+
headers = arguments.delete(:headers) || {}
|
34
|
+
|
33
35
|
arguments = arguments.clone
|
34
36
|
|
35
37
|
_index = arguments.delete(:index)
|
@@ -47,7 +49,7 @@ module Elasticsearch
|
|
47
49
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
48
50
|
|
49
51
|
body = arguments[:body]
|
50
|
-
perform_request(method, path, params, body).body
|
52
|
+
perform_request(method, path, params, body, headers).body
|
51
53
|
end
|
52
54
|
|
53
55
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,11 +14,11 @@ module Elasticsearch
|
|
14
14
|
|
15
15
|
# @option arguments [Number] :max_concurrent_searches Controls the maximum number of concurrent searches the multi search api will execute
|
16
16
|
# @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
17
|
-
# @option arguments [Number] :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. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on
|
17
|
+
# @option arguments [Number] :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. 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 ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
|
18
18
|
# @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests each sub search executes concurrently per node. 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
|
19
19
|
# @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
|
20
20
|
# @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
|
21
|
-
|
21
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
22
22
|
# @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*)
|
23
23
|
#
|
24
24
|
# *Deprecation notice*:
|
@@ -26,11 +26,13 @@ module Elasticsearch
|
|
26
26
|
# Deprecated since version 7.0.0
|
27
27
|
#
|
28
28
|
#
|
29
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-multi-search.html
|
30
30
|
#
|
31
31
|
def msearch(arguments = {})
|
32
32
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
33
33
|
|
34
|
+
headers = arguments.delete(:headers) || {}
|
35
|
+
|
34
36
|
arguments = arguments.clone
|
35
37
|
|
36
38
|
_index = arguments.delete(:index)
|
@@ -72,7 +74,8 @@ module Elasticsearch
|
|
72
74
|
payload = body
|
73
75
|
end
|
74
76
|
|
75
|
-
|
77
|
+
headers.merge!("Content-Type" => "application/x-ndjson")
|
78
|
+
perform_request(method, path, params, payload, headers).body
|
76
79
|
end
|
77
80
|
|
78
81
|
# Register this action with its valid params when the module is loaded.
|
@@ -16,7 +16,7 @@ module Elasticsearch
|
|
16
16
|
# @option arguments [Number] :max_concurrent_searches Controls the maximum number of concurrent searches the multi search api will execute
|
17
17
|
# @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
|
18
18
|
# @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
|
19
|
-
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
20
20
|
# @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*)
|
21
21
|
#
|
22
22
|
# *Deprecation notice*:
|
@@ -24,11 +24,13 @@ module Elasticsearch
|
|
24
24
|
# Deprecated since version 7.0.0
|
25
25
|
#
|
26
26
|
#
|
27
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
27
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-multi-search.html
|
28
28
|
#
|
29
29
|
def msearch_template(arguments = {})
|
30
30
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
31
31
|
|
32
|
+
headers = arguments.delete(:headers) || {}
|
33
|
+
|
32
34
|
arguments = arguments.clone
|
33
35
|
|
34
36
|
_index = arguments.delete(:index)
|
@@ -56,7 +58,8 @@ module Elasticsearch
|
|
56
58
|
payload = body
|
57
59
|
end
|
58
60
|
|
59
|
-
|
61
|
+
headers.merge!("Content-Type" => "application/x-ndjson")
|
62
|
+
perform_request(method, path, params, payload, headers).body
|
60
63
|
end
|
61
64
|
|
62
65
|
# Register this action with its valid params when the module is loaded.
|
@@ -23,6 +23,7 @@ module Elasticsearch
|
|
23
23
|
# @option arguments [String] :version_type Specific version type
|
24
24
|
# (options: internal,external,external_gte,force)
|
25
25
|
|
26
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
26
27
|
# @option arguments [Hash] :body Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
|
27
28
|
#
|
28
29
|
# *Deprecation notice*:
|
@@ -30,9 +31,11 @@ module Elasticsearch
|
|
30
31
|
# Deprecated since version 7.0.0
|
31
32
|
#
|
32
33
|
#
|
33
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-multi-termvectors.html
|
34
35
|
#
|
35
36
|
def mtermvectors(arguments = {})
|
37
|
+
headers = arguments.delete(:headers) || {}
|
38
|
+
|
36
39
|
arguments = arguments.clone
|
37
40
|
ids = arguments.delete(:ids)
|
38
41
|
|
@@ -47,7 +50,7 @@ module Elasticsearch
|
|
47
50
|
"#{Utils.__listify(_index)}/_mtermvectors"
|
48
51
|
else
|
49
52
|
"_mtermvectors"
|
50
|
-
end
|
53
|
+
end
|
51
54
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
52
55
|
|
53
56
|
if ids
|
@@ -55,7 +58,7 @@ end
|
|
55
58
|
else
|
56
59
|
body = arguments[:body]
|
57
60
|
end
|
58
|
-
perform_request(method, path, params, body).body
|
61
|
+
perform_request(method, path, params, body, headers).body
|
59
62
|
end
|
60
63
|
|
61
64
|
# Register this action with its valid params when the module is loaded.
|
@@ -17,16 +17,18 @@ module Elasticsearch
|
|
17
17
|
# (options: cpu,wait,block)
|
18
18
|
|
19
19
|
# @option arguments [Time] :timeout Explicit operation timeout
|
20
|
-
|
20
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
21
21
|
#
|
22
22
|
# *Deprecation notice*:
|
23
23
|
# The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons
|
24
24
|
# Deprecated since version 7.0.0
|
25
25
|
#
|
26
26
|
#
|
27
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
27
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-nodes-hot-threads.html
|
28
28
|
#
|
29
29
|
def hot_threads(arguments = {})
|
30
|
+
headers = arguments.delete(:headers) || {}
|
31
|
+
|
30
32
|
arguments = arguments.clone
|
31
33
|
|
32
34
|
_node_id = arguments.delete(:node_id)
|
@@ -36,11 +38,11 @@ module Elasticsearch
|
|
36
38
|
"_cluster/nodes/#{Utils.__listify(_node_id)}/hot_threads"
|
37
39
|
else
|
38
40
|
"_cluster/nodes/hot_threads"
|
39
|
-
end
|
41
|
+
end
|
40
42
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
41
43
|
|
42
44
|
body = nil
|
43
|
-
perform_request(method, path, params, body).body
|
45
|
+
perform_request(method, path, params, body, headers).body
|
44
46
|
end
|
45
47
|
|
46
48
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,11 +14,13 @@ module Elasticsearch
|
|
14
14
|
|
15
15
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
16
16
|
# @option arguments [Time] :timeout Explicit operation timeout
|
17
|
-
|
17
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
18
18
|
#
|
19
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
19
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-nodes-info.html
|
20
20
|
#
|
21
21
|
def info(arguments = {})
|
22
|
+
headers = arguments.delete(:headers) || {}
|
23
|
+
|
22
24
|
arguments = arguments.clone
|
23
25
|
|
24
26
|
_node_id = arguments.delete(:node_id)
|
@@ -34,11 +36,11 @@ module Elasticsearch
|
|
34
36
|
"_nodes/#{Utils.__listify(_metric)}"
|
35
37
|
else
|
36
38
|
"_nodes"
|
37
|
-
end
|
39
|
+
end
|
38
40
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
39
41
|
|
40
42
|
body = nil
|
41
|
-
perform_request(method, path, params, body).body
|
43
|
+
perform_request(method, path, params, body, headers).body
|
42
44
|
end
|
43
45
|
|
44
46
|
# Register this action with its valid params when the module is loaded.
|
@@ -10,11 +10,14 @@ module Elasticsearch
|
|
10
10
|
#
|
11
11
|
# @option arguments [List] :node_id A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
|
12
12
|
# @option arguments [Time] :timeout Explicit operation timeout
|
13
|
-
|
13
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
14
|
+
# @option arguments [Hash] :body An object containing the password for the elasticsearch keystore
|
14
15
|
#
|
15
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/secure-settings.html#reloadable-secure-settings
|
16
17
|
#
|
17
18
|
def reload_secure_settings(arguments = {})
|
19
|
+
headers = arguments.delete(:headers) || {}
|
20
|
+
|
18
21
|
arguments = arguments.clone
|
19
22
|
|
20
23
|
_node_id = arguments.delete(:node_id)
|
@@ -24,11 +27,11 @@ module Elasticsearch
|
|
24
27
|
"_nodes/#{Utils.__listify(_node_id)}/reload_secure_settings"
|
25
28
|
else
|
26
29
|
"_nodes/reload_secure_settings"
|
27
|
-
end
|
30
|
+
end
|
28
31
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
29
32
|
|
30
|
-
body =
|
31
|
-
perform_request(method, path, params, body).body
|
33
|
+
body = arguments[:body]
|
34
|
+
perform_request(method, path, params, body, headers).body
|
32
35
|
end
|
33
36
|
|
34
37
|
# Register this action with its valid params when the module is loaded.
|
@@ -25,11 +25,13 @@ module Elasticsearch
|
|
25
25
|
# @option arguments [List] :types A comma-separated list of document types for the `indexing` index metric
|
26
26
|
# @option arguments [Time] :timeout Explicit operation timeout
|
27
27
|
# @option arguments [Boolean] :include_segment_file_sizes Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
|
28
|
-
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
#
|
30
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-nodes-stats.html
|
31
31
|
#
|
32
32
|
def stats(arguments = {})
|
33
|
+
headers = arguments.delete(:headers) || {}
|
34
|
+
|
33
35
|
arguments = arguments.clone
|
34
36
|
|
35
37
|
_node_id = arguments.delete(:node_id)
|
@@ -51,11 +53,11 @@ module Elasticsearch
|
|
51
53
|
"_nodes/stats/#{Utils.__listify(_metric)}"
|
52
54
|
else
|
53
55
|
"_nodes/stats"
|
54
|
-
end
|
56
|
+
end
|
55
57
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
56
58
|
|
57
59
|
body = nil
|
58
|
-
perform_request(method, path, params, body).body
|
60
|
+
perform_request(method, path, params, body, headers).body
|
59
61
|
end
|
60
62
|
|
61
63
|
# Register this action with its valid params when the module is loaded.
|
@@ -13,11 +13,13 @@ module Elasticsearch
|
|
13
13
|
# (options: _all,rest_actions)
|
14
14
|
|
15
15
|
# @option arguments [Time] :timeout Explicit operation timeout
|
16
|
-
|
16
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
17
17
|
#
|
18
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
18
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-nodes-usage.html
|
19
19
|
#
|
20
20
|
def usage(arguments = {})
|
21
|
+
headers = arguments.delete(:headers) || {}
|
22
|
+
|
21
23
|
arguments = arguments.clone
|
22
24
|
|
23
25
|
_node_id = arguments.delete(:node_id)
|
@@ -33,11 +35,11 @@ module Elasticsearch
|
|
33
35
|
"_nodes/usage/#{Utils.__listify(_metric)}"
|
34
36
|
else
|
35
37
|
"_nodes/usage"
|
36
|
-
end
|
38
|
+
end
|
37
39
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
38
40
|
|
39
41
|
body = nil
|
40
|
-
perform_request(method, path, params, body).body
|
42
|
+
perform_request(method, path, params, body, headers).body
|
41
43
|
end
|
42
44
|
|
43
45
|
# Register this action with its valid params when the module is loaded.
|
@@ -7,11 +7,13 @@ module Elasticsearch
|
|
7
7
|
module Actions
|
8
8
|
# Returns whether the cluster is running.
|
9
9
|
#
|
10
|
-
|
10
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
11
11
|
#
|
12
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
12
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/index.html
|
13
13
|
#
|
14
14
|
def ping(arguments = {})
|
15
|
+
headers = arguments.delete(:headers) || {}
|
16
|
+
|
15
17
|
arguments = arguments.clone
|
16
18
|
|
17
19
|
method = Elasticsearch::API::HTTP_HEAD
|
@@ -20,7 +22,7 @@ module Elasticsearch
|
|
20
22
|
|
21
23
|
body = nil
|
22
24
|
begin
|
23
|
-
perform_request(method, path, params, body).status == 200 ? true : false
|
25
|
+
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
24
26
|
rescue Exception => e
|
25
27
|
if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i
|
26
28
|
false
|
@@ -12,15 +12,17 @@ module Elasticsearch
|
|
12
12
|
# @option arguments [Time] :timeout Explicit operation timeout
|
13
13
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
14
14
|
# @option arguments [String] :context Context name to compile script against
|
15
|
-
|
15
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
16
16
|
# @option arguments [Hash] :body The document (*Required*)
|
17
17
|
#
|
18
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
18
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-scripting.html
|
19
19
|
#
|
20
20
|
def put_script(arguments = {})
|
21
21
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
22
22
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
23
23
|
|
24
|
+
headers = arguments.delete(:headers) || {}
|
25
|
+
|
24
26
|
arguments = arguments.clone
|
25
27
|
|
26
28
|
_id = arguments.delete(:id)
|
@@ -36,7 +38,7 @@ module Elasticsearch
|
|
36
38
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
37
39
|
|
38
40
|
body = arguments[:body]
|
39
|
-
perform_request(method, path, params, body).body
|
41
|
+
perform_request(method, path, params, body, headers).body
|
40
42
|
end
|
41
43
|
|
42
44
|
# Register this action with its valid params when the module is loaded.
|
@@ -11,18 +11,21 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
12
12
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
13
13
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
14
|
-
# (options: open,closed,none,all)
|
14
|
+
# (options: open,closed,hidden,none,all)
|
15
15
|
|
16
16
|
# @option arguments [String] :search_type Search operation type
|
17
17
|
# (options: query_then_fetch,dfs_query_then_fetch)
|
18
18
|
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
19
20
|
# @option arguments [Hash] :body The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (*Required*)
|
20
21
|
#
|
21
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
22
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-rank-eval.html
|
22
23
|
#
|
23
24
|
def rank_eval(arguments = {})
|
24
25
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
25
26
|
|
27
|
+
headers = arguments.delete(:headers) || {}
|
28
|
+
|
26
29
|
arguments = arguments.clone
|
27
30
|
|
28
31
|
_index = arguments.delete(:index)
|
@@ -36,7 +39,7 @@ module Elasticsearch
|
|
36
39
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
37
40
|
|
38
41
|
body = arguments[:body]
|
39
|
-
perform_request(method, path, params, body).body
|
42
|
+
perform_request(method, path, params, body, headers).body
|
40
43
|
end
|
41
44
|
|
42
45
|
# Register this action with its valid params when the module is loaded.
|
@@ -15,16 +15,18 @@ module Elasticsearch
|
|
15
15
|
# @option arguments [Boolean] :wait_for_completion Should the request should block until the reindex is complete.
|
16
16
|
# @option arguments [Number] :requests_per_second The throttle to set on this request in sub-requests per second. -1 means no throttle.
|
17
17
|
# @option arguments [Time] :scroll Control how long to keep the search context alive
|
18
|
-
# @option arguments [Number] :slices The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
|
18
|
+
# @option arguments [Number|string] :slices The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
|
19
19
|
# @option arguments [Number] :max_docs Maximum number of documents to process (default: all documents)
|
20
|
-
|
20
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
21
21
|
# @option arguments [Hash] :body The search definition using the Query DSL and the prototype for the index request. (*Required*)
|
22
22
|
#
|
23
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
23
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-reindex.html
|
24
24
|
#
|
25
25
|
def reindex(arguments = {})
|
26
26
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
27
27
|
|
28
|
+
headers = arguments.delete(:headers) || {}
|
29
|
+
|
28
30
|
arguments = arguments.clone
|
29
31
|
|
30
32
|
method = Elasticsearch::API::HTTP_POST
|
@@ -32,7 +34,7 @@ module Elasticsearch
|
|
32
34
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
33
35
|
|
34
36
|
body = arguments[:body]
|
35
|
-
perform_request(method, path, params, body).body
|
37
|
+
perform_request(method, path, params, body, headers).body
|
36
38
|
end
|
37
39
|
|
38
40
|
# Register this action with its valid params when the module is loaded.
|
@@ -9,13 +9,15 @@ module Elasticsearch
|
|
9
9
|
#
|
10
10
|
# @option arguments [String] :task_id The task id to rethrottle
|
11
11
|
# @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*)
|
12
|
-
|
12
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
13
13
|
#
|
14
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
14
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-reindex.html
|
15
15
|
#
|
16
16
|
def reindex_rethrottle(arguments = {})
|
17
17
|
raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
|
18
18
|
|
19
|
+
headers = arguments.delete(:headers) || {}
|
20
|
+
|
19
21
|
arguments = arguments.clone
|
20
22
|
|
21
23
|
_task_id = arguments.delete(:task_id)
|
@@ -25,7 +27,7 @@ module Elasticsearch
|
|
25
27
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
26
28
|
|
27
29
|
body = nil
|
28
|
-
perform_request(method, path, params, body).body
|
30
|
+
perform_request(method, path, params, body, headers).body
|
29
31
|
end
|
30
32
|
|
31
33
|
# Register this action with its valid params when the module is loaded.
|
@@ -8,12 +8,14 @@ module Elasticsearch
|
|
8
8
|
# Allows to use the Mustache language to pre-render a search definition.
|
9
9
|
#
|
10
10
|
# @option arguments [String] :id The id of the stored search template
|
11
|
-
|
11
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
12
12
|
# @option arguments [Hash] :body The search definition template and its params
|
13
13
|
#
|
14
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
14
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-template.html#_validating_templates
|
15
15
|
#
|
16
16
|
def render_search_template(arguments = {})
|
17
|
+
headers = arguments.delete(:headers) || {}
|
18
|
+
|
17
19
|
arguments = arguments.clone
|
18
20
|
|
19
21
|
_id = arguments.delete(:id)
|
@@ -23,11 +25,11 @@ module Elasticsearch
|
|
23
25
|
"_render/template/#{Utils.__listify(_id)}"
|
24
26
|
else
|
25
27
|
"_render/template"
|
26
|
-
end
|
28
|
+
end
|
27
29
|
params = {}
|
28
30
|
|
29
31
|
body = arguments[:body]
|
30
|
-
perform_request(method, path, params, body).body
|
32
|
+
perform_request(method, path, params, body, headers).body
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
@@ -7,12 +7,14 @@ module Elasticsearch
|
|
7
7
|
module Actions
|
8
8
|
# Allows an arbitrary script to be executed and a result to be returned
|
9
9
|
#
|
10
|
-
|
10
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
11
11
|
# @option arguments [Hash] :body The script to execute
|
12
12
|
#
|
13
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/painless/7.
|
13
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/painless/7.7/painless-execute-api.html
|
14
14
|
#
|
15
15
|
def scripts_painless_execute(arguments = {})
|
16
|
+
headers = arguments.delete(:headers) || {}
|
17
|
+
|
16
18
|
arguments = arguments.clone
|
17
19
|
|
18
20
|
method = Elasticsearch::API::HTTP_GET
|
@@ -20,7 +22,7 @@ module Elasticsearch
|
|
20
22
|
params = {}
|
21
23
|
|
22
24
|
body = arguments[:body]
|
23
|
-
perform_request(method, path, params, body).body
|
25
|
+
perform_request(method, path, params, body, headers).body
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -11,7 +11,7 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search
|
12
12
|
# @option arguments [String] :scroll_id The scroll ID for scrolled search
|
13
13
|
# @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
|
14
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
15
15
|
# @option arguments [Hash] :body The scroll ID if not passed by URL or query parameter.
|
16
16
|
#
|
17
17
|
# *Deprecation notice*:
|
@@ -19,9 +19,11 @@ module Elasticsearch
|
|
19
19
|
# Deprecated since version 7.0.0
|
20
20
|
#
|
21
21
|
#
|
22
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
22
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-request-body.html#request-body-search-scroll
|
23
23
|
#
|
24
24
|
def scroll(arguments = {})
|
25
|
+
headers = arguments.delete(:headers) || {}
|
26
|
+
|
25
27
|
arguments = arguments.clone
|
26
28
|
|
27
29
|
_scroll_id = arguments.delete(:scroll_id)
|
@@ -31,11 +33,11 @@ module Elasticsearch
|
|
31
33
|
"_search/scroll/#{Utils.__listify(_scroll_id)}"
|
32
34
|
else
|
33
35
|
"_search/scroll"
|
34
|
-
end
|
36
|
+
end
|
35
37
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
36
38
|
|
37
39
|
body = arguments[:body]
|
38
|
-
perform_request(method, path, params, body).body
|
40
|
+
perform_request(method, path, params, body, headers).body
|
39
41
|
end
|
40
42
|
|
41
43
|
# Register this action with its valid params when the module is loaded.
|
@@ -24,7 +24,7 @@ module Elasticsearch
|
|
24
24
|
# @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
|
25
25
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
26
26
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
27
|
-
# (options: open,closed,none,all)
|
27
|
+
# (options: open,closed,hidden,none,all)
|
28
28
|
|
29
29
|
# @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
30
30
|
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
@@ -57,9 +57,9 @@ module Elasticsearch
|
|
57
57
|
# @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting
|
58
58
|
# @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
|
59
59
|
# @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
|
60
|
-
# @option arguments [Number] :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. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on
|
60
|
+
# @option arguments [Number] :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. 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 ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
|
61
61
|
# @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
|
62
|
-
|
62
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
63
63
|
# @option arguments [Hash] :body The search definition using the Query DSL
|
64
64
|
#
|
65
65
|
# *Deprecation notice*:
|
@@ -67,9 +67,11 @@ module Elasticsearch
|
|
67
67
|
# Deprecated since version 7.0.0
|
68
68
|
#
|
69
69
|
#
|
70
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
70
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-search.html
|
71
71
|
#
|
72
72
|
def search(arguments = {})
|
73
|
+
headers = arguments.delete(:headers) || {}
|
74
|
+
|
73
75
|
arguments = arguments.clone
|
74
76
|
arguments[:index] = UNDERSCORE_ALL if !arguments[:index] && arguments[:type]
|
75
77
|
|
@@ -84,11 +86,11 @@ module Elasticsearch
|
|
84
86
|
"#{Utils.__listify(_index)}/_search"
|
85
87
|
else
|
86
88
|
"_search"
|
87
|
-
end
|
89
|
+
end
|
88
90
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
89
91
|
|
90
92
|
body = arguments[:body]
|
91
|
-
perform_request(method, path, params, body).body
|
93
|
+
perform_request(method, path, params, body, headers).body
|
92
94
|
end
|
93
95
|
|
94
96
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,12 +14,15 @@ module Elasticsearch
|
|
14
14
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
15
15
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
16
16
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
17
|
-
# (options: open,closed,none,all)
|
17
|
+
# (options: open,closed,hidden,none,all)
|
18
18
|
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
19
20
|
#
|
20
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
21
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-shards.html
|
21
22
|
#
|
22
23
|
def search_shards(arguments = {})
|
24
|
+
headers = arguments.delete(:headers) || {}
|
25
|
+
|
23
26
|
arguments = arguments.clone
|
24
27
|
|
25
28
|
_index = arguments.delete(:index)
|
@@ -29,11 +32,11 @@ module Elasticsearch
|
|
29
32
|
"#{Utils.__listify(_index)}/_search_shards"
|
30
33
|
else
|
31
34
|
"_search_shards"
|
32
|
-
end
|
35
|
+
end
|
33
36
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
34
37
|
|
35
38
|
body = nil
|
36
|
-
perform_request(method, path, params, body).body
|
39
|
+
perform_request(method, path, params, body, headers).body
|
37
40
|
end
|
38
41
|
|
39
42
|
# Register this action with its valid params when the module is loaded.
|