elasticsearch-api 7.8.0 → 7.9.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api.rb +2 -1
- data/lib/elasticsearch/api/actions/bulk.rb +6 -5
- data/lib/elasticsearch/api/actions/cat/aliases.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/allocation.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/count.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/health.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/help.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/indices.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/master.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/nodes.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/plugins.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/recovery.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/repositories.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/segments.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/shards.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/tasks.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/templates.rb +3 -3
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +3 -3
- data/lib/elasticsearch/api/actions/clear_scroll.rb +3 -3
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +9 -4
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +3 -3
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/health.rb +3 -3
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +2 -2
- data/lib/elasticsearch/api/actions/cluster/state.rb +3 -3
- data/lib/elasticsearch/api/actions/cluster/stats.rb +3 -3
- data/lib/elasticsearch/api/actions/count.rb +9 -14
- data/lib/elasticsearch/api/actions/create.rb +2 -2
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +60 -0
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +60 -0
- data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +43 -0
- data/lib/elasticsearch/api/actions/dangling_indices/params_registry.rb +60 -0
- data/lib/elasticsearch/api/actions/delete.rb +3 -3
- data/lib/elasticsearch/api/actions/delete_by_query.rb +3 -3
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +2 -2
- data/lib/elasticsearch/api/actions/delete_script.rb +2 -2
- data/lib/elasticsearch/api/actions/exists.rb +3 -3
- data/lib/elasticsearch/api/actions/exists_source.rb +3 -3
- data/lib/elasticsearch/api/actions/explain.rb +12 -7
- data/lib/elasticsearch/api/actions/field_caps.rb +14 -8
- data/lib/elasticsearch/api/actions/get.rb +3 -3
- data/lib/elasticsearch/api/actions/get_script.rb +2 -2
- data/lib/elasticsearch/api/actions/get_script_context.rb +2 -2
- data/lib/elasticsearch/api/actions/get_script_languages.rb +2 -2
- data/lib/elasticsearch/api/actions/get_source.rb +3 -3
- data/lib/elasticsearch/api/actions/index.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/add_block.rb +70 -0
- data/lib/elasticsearch/api/actions/indices/analyze.rb +12 -7
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/clone.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/close.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/create.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +3 -4
- data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +62 -0
- data/lib/elasticsearch/api/actions/indices/delete.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/exists.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/flush.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/get.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/{get_data_streams.rb → get_data_stream.rb} +7 -7
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/get_index_template.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +4 -4
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/get_template.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/open.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/put_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/recovery.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/refresh.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +58 -0
- data/lib/elasticsearch/api/actions/indices/rollover.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/segments.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/shrink.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +63 -0
- data/lib/elasticsearch/api/actions/indices/split.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/stats.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +3 -3
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +14 -9
- data/lib/elasticsearch/api/actions/info.rb +2 -2
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +2 -2
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +3 -3
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +2 -2
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +2 -2
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +4 -4
- data/lib/elasticsearch/api/actions/mget.rb +4 -4
- data/lib/elasticsearch/api/actions/msearch.rb +5 -5
- data/lib/elasticsearch/api/actions/msearch_template.rb +5 -5
- data/lib/elasticsearch/api/actions/mtermvectors.rb +15 -10
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +3 -3
- data/lib/elasticsearch/api/actions/nodes/info.rb +3 -3
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +3 -3
- data/lib/elasticsearch/api/actions/nodes/stats.rb +4 -4
- data/lib/elasticsearch/api/actions/nodes/usage.rb +3 -3
- data/lib/elasticsearch/api/actions/ping.rb +2 -2
- data/lib/elasticsearch/api/actions/put_script.rb +3 -3
- data/lib/elasticsearch/api/actions/rank_eval.rb +4 -4
- data/lib/elasticsearch/api/actions/reindex.rb +2 -2
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +2 -2
- data/lib/elasticsearch/api/actions/render_search_template.rb +12 -7
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +9 -4
- data/lib/elasticsearch/api/actions/scroll.rb +12 -7
- data/lib/elasticsearch/api/actions/search.rb +14 -9
- data/lib/elasticsearch/api/actions/search_shards.rb +3 -3
- data/lib/elasticsearch/api/actions/search_template.rb +4 -4
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +2 -2
- data/lib/elasticsearch/api/actions/snapshot/create.rb +2 -2
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +2 -2
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +2 -2
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +2 -2
- data/lib/elasticsearch/api/actions/snapshot/get.rb +2 -2
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +3 -3
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +2 -2
- data/lib/elasticsearch/api/actions/snapshot/status.rb +3 -3
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +2 -2
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +3 -3
- data/lib/elasticsearch/api/actions/tasks/get.rb +2 -2
- data/lib/elasticsearch/api/actions/tasks/list.rb +2 -2
- data/lib/elasticsearch/api/actions/termvectors.rb +8 -4
- data/lib/elasticsearch/api/actions/update.rb +3 -3
- data/lib/elasticsearch/api/actions/update_by_query.rb +3 -3
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +2 -2
- data/lib/elasticsearch/api/namespace/cat.rb +0 -1
- data/lib/elasticsearch/api/namespace/dangling_indices.rb +35 -0
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/count_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +48 -0
- data/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +48 -0
- data/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +8 -9
- data/spec/elasticsearch/api/actions/indices/add_block_spec.rb +63 -0
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +7 -8
- data/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb +72 -0
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +7 -13
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +6 -7
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +10 -13
- data/spec/elasticsearch/api/actions/mget_spec.rb +5 -6
- data/spec/elasticsearch/api/actions/msearch_spec.rb +5 -6
- data/spec/elasticsearch/api/actions/msearch_template_spec.rb +5 -6
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +7 -7
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/scroll_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/search_spec.rb +7 -7
- data/spec/elasticsearch/api/actions/search_template_spec.rb +5 -6
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +5 -7
- data/spec/elasticsearch/api/rest_api_yaml_spec.rb +0 -1
- data/utils/thor/.rubocop.yml +2 -0
- data/utils/thor/generate_source.rb +22 -15
- data/utils/thor/generator/endpoint_specifics.rb +8 -1
- data/utils/thor/templates/_documentation_top.erb +11 -1
- metadata +26 -12
- data/spec/README.md +0 -61
- data/test/integration/yaml_test_runner.rb +0 -592
- data/test/test_helper.rb +0 -118
@@ -29,7 +29,7 @@ module Elasticsearch
|
|
29
29
|
# @option arguments [Time] :timeout Explicit operation timeout
|
30
30
|
# @option arguments [Hash] :headers Custom HTTP headers
|
31
31
|
#
|
32
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
32
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-nodes-info.html
|
33
33
|
#
|
34
34
|
def info(arguments = {})
|
35
35
|
headers = arguments.delete(:headers) || {}
|
@@ -49,7 +49,7 @@ module Elasticsearch
|
|
49
49
|
"_nodes/#{Utils.__listify(_metric)}"
|
50
50
|
else
|
51
51
|
"_nodes"
|
52
|
-
|
52
|
+
end
|
53
53
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
54
54
|
|
55
55
|
body = nil
|
@@ -63,7 +63,7 @@ module Elasticsearch
|
|
63
63
|
:flat_settings,
|
64
64
|
:timeout
|
65
65
|
].freeze)
|
66
|
-
end
|
67
66
|
end
|
67
|
+
end
|
68
68
|
end
|
69
69
|
end
|
@@ -26,7 +26,7 @@ module Elasticsearch
|
|
26
26
|
# @option arguments [Hash] :headers Custom HTTP headers
|
27
27
|
# @option arguments [Hash] :body An object containing the password for the elasticsearch keystore
|
28
28
|
#
|
29
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/secure-settings.html#reloadable-secure-settings
|
30
30
|
#
|
31
31
|
def reload_secure_settings(arguments = {})
|
32
32
|
headers = arguments.delete(:headers) || {}
|
@@ -40,7 +40,7 @@ module Elasticsearch
|
|
40
40
|
"_nodes/#{Utils.__listify(_node_id)}/reload_secure_settings"
|
41
41
|
else
|
42
42
|
"_nodes/reload_secure_settings"
|
43
|
-
|
43
|
+
end
|
44
44
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
45
45
|
|
46
46
|
body = arguments[:body]
|
@@ -53,7 +53,7 @@ module Elasticsearch
|
|
53
53
|
ParamsRegistry.register(:reload_secure_settings, [
|
54
54
|
:timeout
|
55
55
|
].freeze)
|
56
|
-
end
|
57
56
|
end
|
57
|
+
end
|
58
58
|
end
|
59
59
|
end
|
@@ -23,7 +23,7 @@ module Elasticsearch
|
|
23
23
|
#
|
24
24
|
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
25
25
|
# @option arguments [List] :metric Limit the information returned to the specified metrics
|
26
|
-
# (options: _all,breaker,fs,http,indices,jvm,os,process,thread_pool,transport,discovery)
|
26
|
+
# (options: _all,breaker,fs,http,indices,jvm,os,process,thread_pool,transport,discovery,indexing_pressure)
|
27
27
|
|
28
28
|
# @option arguments [List] :index_metric Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
|
29
29
|
# (options: _all,completion,docs,fielddata,query_cache,flush,get,indexing,merge,request_cache,refresh,search,segments,store,warmer,suggest)
|
@@ -40,7 +40,7 @@ module Elasticsearch
|
|
40
40
|
# @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)
|
41
41
|
# @option arguments [Hash] :headers Custom HTTP headers
|
42
42
|
#
|
43
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
43
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-nodes-stats.html
|
44
44
|
#
|
45
45
|
def stats(arguments = {})
|
46
46
|
headers = arguments.delete(:headers) || {}
|
@@ -66,7 +66,7 @@ module Elasticsearch
|
|
66
66
|
"_nodes/stats/#{Utils.__listify(_metric)}"
|
67
67
|
else
|
68
68
|
"_nodes/stats"
|
69
|
-
|
69
|
+
end
|
70
70
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
71
71
|
|
72
72
|
body = nil
|
@@ -86,7 +86,7 @@ module Elasticsearch
|
|
86
86
|
:timeout,
|
87
87
|
:include_segment_file_sizes
|
88
88
|
].freeze)
|
89
|
-
end
|
90
89
|
end
|
90
|
+
end
|
91
91
|
end
|
92
92
|
end
|
@@ -28,7 +28,7 @@ module Elasticsearch
|
|
28
28
|
# @option arguments [Time] :timeout Explicit operation timeout
|
29
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
30
|
#
|
31
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/cluster-nodes-usage.html
|
32
32
|
#
|
33
33
|
def usage(arguments = {})
|
34
34
|
headers = arguments.delete(:headers) || {}
|
@@ -48,7 +48,7 @@ module Elasticsearch
|
|
48
48
|
"_nodes/usage/#{Utils.__listify(_metric)}"
|
49
49
|
else
|
50
50
|
"_nodes/usage"
|
51
|
-
|
51
|
+
end
|
52
52
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
53
53
|
|
54
54
|
body = nil
|
@@ -61,7 +61,7 @@ module Elasticsearch
|
|
61
61
|
ParamsRegistry.register(:usage, [
|
62
62
|
:timeout
|
63
63
|
].freeze)
|
64
|
-
end
|
65
64
|
end
|
65
|
+
end
|
66
66
|
end
|
67
67
|
end
|
@@ -22,7 +22,7 @@ module Elasticsearch
|
|
22
22
|
#
|
23
23
|
# @option arguments [Hash] :headers Custom HTTP headers
|
24
24
|
#
|
25
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
25
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/index.html
|
26
26
|
#
|
27
27
|
def ping(arguments = {})
|
28
28
|
headers = arguments.delete(:headers) || {}
|
@@ -45,5 +45,5 @@ module Elasticsearch
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
48
|
-
|
48
|
+
end
|
49
49
|
end
|
@@ -28,7 +28,7 @@ module Elasticsearch
|
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
# @option arguments [Hash] :body The document (*Required*)
|
30
30
|
#
|
31
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting.html
|
32
32
|
#
|
33
33
|
def put_script(arguments = {})
|
34
34
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
@@ -47,7 +47,7 @@ module Elasticsearch
|
|
47
47
|
"_scripts/#{Utils.__listify(_id)}/#{Utils.__listify(_context)}"
|
48
48
|
else
|
49
49
|
"_scripts/#{Utils.__listify(_id)}"
|
50
|
-
|
50
|
+
end
|
51
51
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
52
52
|
|
53
53
|
body = arguments[:body]
|
@@ -63,5 +63,5 @@ module Elasticsearch
|
|
63
63
|
:context
|
64
64
|
].freeze)
|
65
65
|
end
|
66
|
-
|
66
|
+
end
|
67
67
|
end
|
@@ -32,7 +32,7 @@ module Elasticsearch
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (*Required*)
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-rank-eval.html
|
36
36
|
#
|
37
37
|
def rank_eval(arguments = {})
|
38
38
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
@@ -43,12 +43,12 @@ module Elasticsearch
|
|
43
43
|
|
44
44
|
_index = arguments.delete(:index)
|
45
45
|
|
46
|
-
method = Elasticsearch::API::
|
46
|
+
method = Elasticsearch::API::HTTP_POST
|
47
47
|
path = if _index
|
48
48
|
"#{Utils.__listify(_index)}/_rank_eval"
|
49
49
|
else
|
50
50
|
"_rank_eval"
|
51
|
-
|
51
|
+
end
|
52
52
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
53
53
|
|
54
54
|
body = arguments[:body]
|
@@ -65,5 +65,5 @@ module Elasticsearch
|
|
65
65
|
:search_type
|
66
66
|
].freeze)
|
67
67
|
end
|
68
|
-
|
68
|
+
end
|
69
69
|
end
|
@@ -33,7 +33,7 @@ module Elasticsearch
|
|
33
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
34
|
# @option arguments [Hash] :body The search definition using the Query DSL and the prototype for the index request. (*Required*)
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
36
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-reindex.html
|
37
37
|
#
|
38
38
|
def reindex(arguments = {})
|
39
39
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
@@ -64,5 +64,5 @@ module Elasticsearch
|
|
64
64
|
:max_docs
|
65
65
|
].freeze)
|
66
66
|
end
|
67
|
-
|
67
|
+
end
|
68
68
|
end
|
@@ -24,7 +24,7 @@ module Elasticsearch
|
|
24
24
|
# @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*)
|
25
25
|
# @option arguments [Hash] :headers Custom HTTP headers
|
26
26
|
#
|
27
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
27
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-reindex.html
|
28
28
|
#
|
29
29
|
def reindex_rethrottle(arguments = {})
|
30
30
|
raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
|
@@ -50,5 +50,5 @@ module Elasticsearch
|
|
50
50
|
:requests_per_second
|
51
51
|
].freeze)
|
52
52
|
end
|
53
|
-
|
53
|
+
end
|
54
54
|
end
|
@@ -24,7 +24,7 @@ module Elasticsearch
|
|
24
24
|
# @option arguments [Hash] :headers Custom HTTP headers
|
25
25
|
# @option arguments [Hash] :body The search definition template and its params
|
26
26
|
#
|
27
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
27
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-template.html#_validating_templates
|
28
28
|
#
|
29
29
|
def render_search_template(arguments = {})
|
30
30
|
headers = arguments.delete(:headers) || {}
|
@@ -33,17 +33,22 @@ module Elasticsearch
|
|
33
33
|
|
34
34
|
_id = arguments.delete(:id)
|
35
35
|
|
36
|
-
method =
|
37
|
-
|
38
|
-
"_render/template/#{Utils.__listify(_id)}"
|
36
|
+
method = if arguments[:body]
|
37
|
+
Elasticsearch::API::HTTP_POST
|
39
38
|
else
|
40
|
-
|
41
|
-
|
39
|
+
Elasticsearch::API::HTTP_GET
|
40
|
+
end
|
41
|
+
|
42
|
+
path = if _id
|
43
|
+
"_render/template/#{Utils.__listify(_id)}"
|
44
|
+
else
|
45
|
+
"_render/template"
|
46
|
+
end
|
42
47
|
params = {}
|
43
48
|
|
44
49
|
body = arguments[:body]
|
45
50
|
perform_request(method, path, params, body, headers).body
|
46
51
|
end
|
47
52
|
end
|
48
|
-
|
53
|
+
end
|
49
54
|
end
|
@@ -23,20 +23,25 @@ module Elasticsearch
|
|
23
23
|
# @option arguments [Hash] :headers Custom HTTP headers
|
24
24
|
# @option arguments [Hash] :body The script to execute
|
25
25
|
#
|
26
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/painless/7.
|
26
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/painless/7.x/painless-execute-api.html
|
27
27
|
#
|
28
28
|
def scripts_painless_execute(arguments = {})
|
29
29
|
headers = arguments.delete(:headers) || {}
|
30
30
|
|
31
31
|
arguments = arguments.clone
|
32
32
|
|
33
|
-
method =
|
34
|
-
|
33
|
+
method = if arguments[:body]
|
34
|
+
Elasticsearch::API::HTTP_POST
|
35
|
+
else
|
36
|
+
Elasticsearch::API::HTTP_GET
|
37
|
+
end
|
38
|
+
|
39
|
+
path = "_scripts/painless/_execute"
|
35
40
|
params = {}
|
36
41
|
|
37
42
|
body = arguments[:body]
|
38
43
|
perform_request(method, path, params, body, headers).body
|
39
44
|
end
|
40
45
|
end
|
41
|
-
|
46
|
+
end
|
42
47
|
end
|
@@ -32,7 +32,7 @@ module Elasticsearch
|
|
32
32
|
# Deprecated since version 7.0.0
|
33
33
|
#
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-request-body.html#request-body-search-scroll
|
36
36
|
#
|
37
37
|
def scroll(arguments = {})
|
38
38
|
headers = arguments.delete(:headers) || {}
|
@@ -41,12 +41,17 @@ module Elasticsearch
|
|
41
41
|
|
42
42
|
_scroll_id = arguments.delete(:scroll_id)
|
43
43
|
|
44
|
-
method =
|
45
|
-
|
46
|
-
"_search/scroll/#{Utils.__listify(_scroll_id)}"
|
44
|
+
method = if arguments[:body]
|
45
|
+
Elasticsearch::API::HTTP_POST
|
47
46
|
else
|
48
|
-
|
49
|
-
|
47
|
+
Elasticsearch::API::HTTP_GET
|
48
|
+
end
|
49
|
+
|
50
|
+
path = if _scroll_id
|
51
|
+
"_search/scroll/#{Utils.__listify(_scroll_id)}"
|
52
|
+
else
|
53
|
+
"_search/scroll"
|
54
|
+
end
|
50
55
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
51
56
|
|
52
57
|
body = arguments[:body]
|
@@ -62,5 +67,5 @@ module Elasticsearch
|
|
62
67
|
:rest_total_hits_as_int
|
63
68
|
].freeze)
|
64
69
|
end
|
65
|
-
|
70
|
+
end
|
66
71
|
end
|
@@ -80,7 +80,7 @@ module Elasticsearch
|
|
80
80
|
# Deprecated since version 7.0.0
|
81
81
|
#
|
82
82
|
#
|
83
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
83
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-search.html
|
84
84
|
#
|
85
85
|
def search(arguments = {})
|
86
86
|
headers = arguments.delete(:headers) || {}
|
@@ -92,14 +92,19 @@ module Elasticsearch
|
|
92
92
|
|
93
93
|
_type = arguments.delete(:type)
|
94
94
|
|
95
|
-
method =
|
96
|
-
|
97
|
-
"#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_search"
|
98
|
-
elsif _index
|
99
|
-
"#{Utils.__listify(_index)}/_search"
|
95
|
+
method = if arguments[:body]
|
96
|
+
Elasticsearch::API::HTTP_POST
|
100
97
|
else
|
101
|
-
|
102
|
-
|
98
|
+
Elasticsearch::API::HTTP_GET
|
99
|
+
end
|
100
|
+
|
101
|
+
path = if _index && _type
|
102
|
+
"#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_search"
|
103
|
+
elsif _index
|
104
|
+
"#{Utils.__listify(_index)}/_search"
|
105
|
+
else
|
106
|
+
"_search"
|
107
|
+
end
|
103
108
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
104
109
|
|
105
110
|
body = arguments[:body]
|
@@ -154,5 +159,5 @@ module Elasticsearch
|
|
154
159
|
:rest_total_hits_as_int
|
155
160
|
].freeze)
|
156
161
|
end
|
157
|
-
|
162
|
+
end
|
158
163
|
end
|
@@ -31,7 +31,7 @@ module Elasticsearch
|
|
31
31
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
#
|
34
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-shards.html
|
35
35
|
#
|
36
36
|
def search_shards(arguments = {})
|
37
37
|
headers = arguments.delete(:headers) || {}
|
@@ -45,7 +45,7 @@ module Elasticsearch
|
|
45
45
|
"#{Utils.__listify(_index)}/_search_shards"
|
46
46
|
else
|
47
47
|
"_search_shards"
|
48
|
-
|
48
|
+
end
|
49
49
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
50
50
|
|
51
51
|
body = nil
|
@@ -64,5 +64,5 @@ module Elasticsearch
|
|
64
64
|
:expand_wildcards
|
65
65
|
].freeze)
|
66
66
|
end
|
67
|
-
|
67
|
+
end
|
68
68
|
end
|
@@ -47,7 +47,7 @@ module Elasticsearch
|
|
47
47
|
# Deprecated since version 7.0.0
|
48
48
|
#
|
49
49
|
#
|
50
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
50
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-template.html
|
51
51
|
#
|
52
52
|
def search_template(arguments = {})
|
53
53
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
@@ -60,14 +60,14 @@ module Elasticsearch
|
|
60
60
|
|
61
61
|
_type = arguments.delete(:type)
|
62
62
|
|
63
|
-
method = Elasticsearch::API::
|
63
|
+
method = Elasticsearch::API::HTTP_POST
|
64
64
|
path = if _index && _type
|
65
65
|
"#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_search/template"
|
66
66
|
elsif _index
|
67
67
|
"#{Utils.__listify(_index)}/_search/template"
|
68
68
|
else
|
69
69
|
"_search/template"
|
70
|
-
|
70
|
+
end
|
71
71
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
72
72
|
|
73
73
|
body = arguments[:body]
|
@@ -93,5 +93,5 @@ module Elasticsearch
|
|
93
93
|
:ccs_minimize_roundtrips
|
94
94
|
].freeze)
|
95
95
|
end
|
96
|
-
|
96
|
+
end
|
97
97
|
end
|
@@ -26,7 +26,7 @@ module Elasticsearch
|
|
26
26
|
# @option arguments [Time] :timeout Explicit operation timeout
|
27
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
28
28
|
#
|
29
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/clean-up-snapshot-repo-api.html
|
30
30
|
#
|
31
31
|
def cleanup_repository(arguments = {})
|
32
32
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -52,7 +52,7 @@ module Elasticsearch
|
|
52
52
|
:master_timeout,
|
53
53
|
:timeout
|
54
54
|
].freeze)
|
55
|
-
end
|
56
55
|
end
|
56
|
+
end
|
57
57
|
end
|
58
58
|
end
|
@@ -28,7 +28,7 @@ module Elasticsearch
|
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
# @option arguments [Hash] :body The snapshot definition
|
30
30
|
#
|
31
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html
|
32
32
|
#
|
33
33
|
def create(arguments = {})
|
34
34
|
raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
|
@@ -57,7 +57,7 @@ module Elasticsearch
|
|
57
57
|
:master_timeout,
|
58
58
|
:wait_for_completion
|
59
59
|
].freeze)
|
60
|
-
end
|
61
60
|
end
|
61
|
+
end
|
62
62
|
end
|
63
63
|
end
|