opensearch-api 2.0.2 → 2.1.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
- checksums.yaml.gz.sig +0 -0
- data/Gemfile +2 -2
- data/Rakefile +3 -3
- data/lib/opensearch/api/actions/cat/allocation.rb +4 -2
- data/lib/opensearch/api/actions/cat/cluster_manager.rb +54 -0
- data/lib/opensearch/api/actions/cat/indices.rb +4 -2
- data/lib/opensearch/api/actions/cat/master.rb +3 -1
- data/lib/opensearch/api/actions/cat/nodeattrs.rb +4 -2
- data/lib/opensearch/api/actions/cat/nodes.rb +4 -2
- data/lib/opensearch/api/actions/cat/pending_tasks.rb +4 -2
- data/lib/opensearch/api/actions/cat/plugins.rb +4 -2
- data/lib/opensearch/api/actions/cat/repositories.rb +4 -2
- data/lib/opensearch/api/actions/cat/shards.rb +4 -2
- data/lib/opensearch/api/actions/cat/snapshots.rb +3 -1
- data/lib/opensearch/api/actions/cat/templates.rb +4 -2
- data/lib/opensearch/api/actions/cat/thread_pool.rb +4 -2
- data/lib/opensearch/api/actions/cluster/delete_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/exists_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/get_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/get_settings.rb +3 -1
- data/lib/opensearch/api/actions/cluster/health.rb +4 -2
- data/lib/opensearch/api/actions/cluster/pending_tasks.rb +5 -3
- data/lib/opensearch/api/actions/cluster/put_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/put_settings.rb +3 -1
- data/lib/opensearch/api/actions/cluster/reroute.rb +4 -2
- data/lib/opensearch/api/actions/cluster/state.rb +4 -2
- data/lib/opensearch/api/actions/dangling_indices/delete_dangling_index.rb +4 -2
- data/lib/opensearch/api/actions/dangling_indices/import_dangling_index.rb +4 -2
- data/lib/opensearch/api/actions/delete_script.rb +4 -2
- data/lib/opensearch/api/actions/features/get_features.rb +4 -2
- data/lib/opensearch/api/actions/get_script.rb +4 -2
- data/lib/opensearch/api/actions/indices/add_block.rb +3 -1
- data/lib/opensearch/api/actions/indices/clone.rb +3 -1
- data/lib/opensearch/api/actions/indices/close.rb +3 -1
- data/lib/opensearch/api/actions/indices/create.rb +4 -2
- data/lib/opensearch/api/actions/indices/delete.rb +3 -1
- data/lib/opensearch/api/actions/indices/delete_alias.rb +4 -2
- data/lib/opensearch/api/actions/indices/delete_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/delete_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/exists_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/exists_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/get.rb +4 -2
- data/lib/opensearch/api/actions/indices/get_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/get_mapping.rb +4 -2
- data/lib/opensearch/api/actions/indices/get_settings.rb +3 -1
- data/lib/opensearch/api/actions/indices/get_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/open.rb +3 -1
- data/lib/opensearch/api/actions/indices/put_alias.rb +4 -2
- data/lib/opensearch/api/actions/indices/put_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/put_mapping.rb +3 -1
- data/lib/opensearch/api/actions/indices/put_settings.rb +3 -1
- data/lib/opensearch/api/actions/indices/put_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/rollover.rb +3 -1
- data/lib/opensearch/api/actions/indices/shrink.rb +3 -1
- data/lib/opensearch/api/actions/indices/simulate_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/simulate_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/split.rb +3 -1
- data/lib/opensearch/api/actions/indices/update_aliases.rb +4 -2
- data/lib/opensearch/api/actions/ingest/delete_pipeline.rb +3 -1
- data/lib/opensearch/api/actions/ingest/get_pipeline.rb +4 -2
- data/lib/opensearch/api/actions/ingest/put_pipeline.rb +3 -1
- data/lib/opensearch/api/actions/put_script.rb +3 -1
- data/lib/opensearch/api/actions/search_shards.rb +1 -1
- data/lib/opensearch/api/actions/snapshot/cleanup_repository.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/clone.rb +4 -2
- data/lib/opensearch/api/actions/snapshot/create.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/create_repository.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/delete.rb +4 -2
- data/lib/opensearch/api/actions/snapshot/delete_repository.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/get.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/get_features.rb +4 -2
- data/lib/opensearch/api/actions/snapshot/get_repository.rb +3 -2
- data/lib/opensearch/api/actions/snapshot/restore.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/status.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/verify_repository.rb +3 -1
- data/lib/opensearch/api/utils.rb +4 -4
- data/lib/opensearch/api/version.rb +1 -1
- data/spec/opensearch/api/actions/cat/allocation_spec.rb +6 -7
- data/spec/opensearch/api/actions/cat/cluster_manager_spec.rb +26 -0
- data/spec/opensearch/api/actions/get_script_spec.rb +2 -2
- data/spec/opensearch/api/actions/hashie_spec.rb +0 -2
- data/spec/opensearch/api/actions/indices/clone_spec.rb +2 -2
- data/spec/opensearch/api/utils_spec.rb +6 -6
- data.tar.gz.sig +0 -0
- metadata +14 -11
- metadata.gz.sig +0 -0
|
@@ -32,7 +32,8 @@ module OpenSearch
|
|
|
32
32
|
# @option arguments [String] :id Script ID
|
|
33
33
|
# @option arguments [String] :context Script context
|
|
34
34
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
35
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
37
38
|
# @option arguments [Hash] :body The document (*Required*)
|
|
38
39
|
#
|
|
@@ -67,6 +68,7 @@ module OpenSearch
|
|
|
67
68
|
ParamsRegistry.register(:put_script, [
|
|
68
69
|
:timeout,
|
|
69
70
|
:master_timeout,
|
|
71
|
+
:cluster_manager_timeout,
|
|
70
72
|
:context
|
|
71
73
|
].freeze)
|
|
72
74
|
end
|
|
@@ -32,7 +32,7 @@ module OpenSearch
|
|
|
32
32
|
# @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
|
33
33
|
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
|
34
34
|
# @option arguments [String] :routing Specific routing value
|
|
35
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
|
35
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
|
36
36
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
37
37
|
# @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)
|
|
38
38
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
|
|
@@ -31,7 +31,8 @@ module OpenSearch
|
|
|
31
31
|
# Removes stale data from repository.
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
35
36
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
37
38
|
#
|
|
@@ -58,6 +59,7 @@ module OpenSearch
|
|
|
58
59
|
# @since 6.2.0
|
|
59
60
|
ParamsRegistry.register(:cleanup_repository, [
|
|
60
61
|
:master_timeout,
|
|
62
|
+
:cluster_manager_timeout,
|
|
61
63
|
:timeout
|
|
62
64
|
].freeze)
|
|
63
65
|
end
|
|
@@ -33,7 +33,8 @@ module OpenSearch
|
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
34
|
# @option arguments [String] :snapshot The name of the snapshot to clone from
|
|
35
35
|
# @option arguments [String] :target_snapshot The name of the cloned snapshot to create
|
|
36
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
38
39
|
# @option arguments [Hash] :body The snapshot clone definition (*Required*)
|
|
39
40
|
#
|
|
@@ -66,7 +67,8 @@ module OpenSearch
|
|
|
66
67
|
#
|
|
67
68
|
# @since 6.2.0
|
|
68
69
|
ParamsRegistry.register(:clone, [
|
|
69
|
-
:master_timeout
|
|
70
|
+
:master_timeout,
|
|
71
|
+
:cluster_manager_timeout
|
|
70
72
|
].freeze)
|
|
71
73
|
end
|
|
72
74
|
end
|
|
@@ -32,7 +32,8 @@ module OpenSearch
|
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
34
|
# @option arguments [String] :snapshot A snapshot name
|
|
35
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
36
37
|
# @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
|
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
38
39
|
# @option arguments [Hash] :body The snapshot definition
|
|
@@ -63,6 +64,7 @@ module OpenSearch
|
|
|
63
64
|
# @since 6.2.0
|
|
64
65
|
ParamsRegistry.register(:create, [
|
|
65
66
|
:master_timeout,
|
|
67
|
+
:cluster_manager_timeout,
|
|
66
68
|
:wait_for_completion
|
|
67
69
|
].freeze)
|
|
68
70
|
end
|
|
@@ -31,7 +31,8 @@ module OpenSearch
|
|
|
31
31
|
# Creates a repository.
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
35
36
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
36
37
|
# @option arguments [Boolean] :verify Whether to verify the repository after creation
|
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
@@ -61,6 +62,7 @@ module OpenSearch
|
|
|
61
62
|
# @since 6.2.0
|
|
62
63
|
ParamsRegistry.register(:create_repository, [
|
|
63
64
|
:master_timeout,
|
|
65
|
+
:cluster_manager_timeout,
|
|
64
66
|
:timeout,
|
|
65
67
|
:verify
|
|
66
68
|
].freeze)
|
|
@@ -32,7 +32,8 @@ module OpenSearch
|
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
34
|
# @option arguments [String] :snapshot A snapshot name
|
|
35
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
37
38
|
#
|
|
38
39
|
#
|
|
@@ -64,7 +65,8 @@ module OpenSearch
|
|
|
64
65
|
#
|
|
65
66
|
# @since 6.2.0
|
|
66
67
|
ParamsRegistry.register(:delete, [
|
|
67
|
-
:master_timeout
|
|
68
|
+
:master_timeout,
|
|
69
|
+
:cluster_manager_timeout
|
|
68
70
|
].freeze)
|
|
69
71
|
end
|
|
70
72
|
end
|
|
@@ -31,7 +31,8 @@ module OpenSearch
|
|
|
31
31
|
# Deletes a repository.
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [List] :repository Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
|
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
35
36
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
37
38
|
#
|
|
@@ -62,6 +63,7 @@ module OpenSearch
|
|
|
62
63
|
# @since 6.2.0
|
|
63
64
|
ParamsRegistry.register(:delete_repository, [
|
|
64
65
|
:master_timeout,
|
|
66
|
+
:cluster_manager_timeout,
|
|
65
67
|
:timeout
|
|
66
68
|
].freeze)
|
|
67
69
|
end
|
|
@@ -32,7 +32,8 @@ module OpenSearch
|
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
34
|
# @option arguments [List] :snapshot A comma-separated list of snapshot names
|
|
35
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
36
37
|
# @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
|
|
37
38
|
# @option arguments [Boolean] :index_details Whether to include details of each index in the snapshot, if those details are available. Defaults to false.
|
|
38
39
|
# @option arguments [Boolean] :include_repository Whether to include the repository name in the snapshot info. Defaults to true.
|
|
@@ -69,6 +70,7 @@ module OpenSearch
|
|
|
69
70
|
# @since 6.2.0
|
|
70
71
|
ParamsRegistry.register(:get, [
|
|
71
72
|
:master_timeout,
|
|
73
|
+
:cluster_manager_timeout,
|
|
72
74
|
:ignore_unavailable,
|
|
73
75
|
:index_details,
|
|
74
76
|
:include_repository,
|
|
@@ -30,7 +30,8 @@ module OpenSearch
|
|
|
30
30
|
module Actions
|
|
31
31
|
# Returns a list of features which can be snapshotted in this cluster.
|
|
32
32
|
#
|
|
33
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
33
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
34
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
34
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
35
36
|
#
|
|
36
37
|
#
|
|
@@ -51,7 +52,8 @@ module OpenSearch
|
|
|
51
52
|
#
|
|
52
53
|
# @since 6.2.0
|
|
53
54
|
ParamsRegistry.register(:get_features, [
|
|
54
|
-
:master_timeout
|
|
55
|
+
:master_timeout,
|
|
56
|
+
:cluster_manager_timeout
|
|
55
57
|
].freeze)
|
|
56
58
|
end
|
|
57
59
|
end
|
|
@@ -31,8 +31,8 @@ module OpenSearch
|
|
|
31
31
|
# Returns information about a repository.
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [List] :repository A comma-separated list of repository names
|
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to
|
|
35
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to cluster_manager node
|
|
35
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
|
36
36
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
37
37
|
#
|
|
38
38
|
#
|
|
@@ -64,6 +64,7 @@ module OpenSearch
|
|
|
64
64
|
# @since 6.2.0
|
|
65
65
|
ParamsRegistry.register(:get_repository, [
|
|
66
66
|
:master_timeout,
|
|
67
|
+
:cluster_manager_timeout,
|
|
67
68
|
:local
|
|
68
69
|
].freeze)
|
|
69
70
|
end
|
|
@@ -32,7 +32,8 @@ module OpenSearch
|
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
34
|
# @option arguments [String] :snapshot A snapshot name
|
|
35
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
36
37
|
# @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
|
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
38
39
|
# @option arguments [Hash] :body Details of what to restore
|
|
@@ -63,6 +64,7 @@ module OpenSearch
|
|
|
63
64
|
# @since 6.2.0
|
|
64
65
|
ParamsRegistry.register(:restore, [
|
|
65
66
|
:master_timeout,
|
|
67
|
+
:cluster_manager_timeout,
|
|
66
68
|
:wait_for_completion
|
|
67
69
|
].freeze)
|
|
68
70
|
end
|
|
@@ -32,7 +32,8 @@ module OpenSearch
|
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
34
|
# @option arguments [List] :snapshot A comma-separated list of snapshot names
|
|
35
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
36
37
|
# @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
|
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
38
39
|
#
|
|
@@ -69,6 +70,7 @@ module OpenSearch
|
|
|
69
70
|
# @since 6.2.0
|
|
70
71
|
ParamsRegistry.register(:status, [
|
|
71
72
|
:master_timeout,
|
|
73
|
+
:cluster_manager_timeout,
|
|
72
74
|
:ignore_unavailable
|
|
73
75
|
].freeze)
|
|
74
76
|
end
|
|
@@ -31,7 +31,8 @@ module OpenSearch
|
|
|
31
31
|
# Verifies a repository.
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [String] :repository A repository name
|
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
|
35
36
|
# @option arguments [Time] :timeout Explicit operation timeout
|
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
37
38
|
#
|
|
@@ -58,6 +59,7 @@ module OpenSearch
|
|
|
58
59
|
# @since 6.2.0
|
|
59
60
|
ParamsRegistry.register(:verify_repository, [
|
|
60
61
|
:master_timeout,
|
|
62
|
+
:cluster_manager_timeout,
|
|
61
63
|
:timeout
|
|
62
64
|
].freeze)
|
|
63
65
|
end
|
data/lib/opensearch/api/utils.rb
CHANGED
|
@@ -97,13 +97,13 @@ module OpenSearch
|
|
|
97
97
|
# in a single item.
|
|
98
98
|
#
|
|
99
99
|
# OpenSearch::API::Utils.__bulkify [
|
|
100
|
-
# { :index => { :_index => 'myindexA', :
|
|
101
|
-
# { :update => { :_index => 'myindexB', :
|
|
100
|
+
# { :index => { :_index => 'myindexA', :_id => '1', :data => { :title => 'Test' } } },
|
|
101
|
+
# { :update => { :_index => 'myindexB', :_id => '2', :data => { :doc => { :title => 'Update' } } } }
|
|
102
102
|
# ]
|
|
103
103
|
#
|
|
104
|
-
# # => {"index":{"_index":"myindexA","
|
|
104
|
+
# # => {"index":{"_index":"myindexA","_id":"1"}}
|
|
105
105
|
# # => {"title":"Test"}
|
|
106
|
-
# # => {"update":{"_index":"myindexB","
|
|
106
|
+
# # => {"update":{"_index":"myindexB","_id":"2"}}
|
|
107
107
|
# # => {"doc":{"title":"Update"}}
|
|
108
108
|
#
|
|
109
109
|
def __bulkify(payload)
|
|
@@ -27,18 +27,17 @@
|
|
|
27
27
|
require 'spec_helper'
|
|
28
28
|
|
|
29
29
|
describe 'client.cat#allocation' do
|
|
30
|
-
|
|
31
30
|
let(:expected_args) do
|
|
32
31
|
[
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
'GET',
|
|
33
|
+
'_cat/allocation',
|
|
34
|
+
{cluster_manager_timeout: 2},
|
|
35
|
+
nil,
|
|
36
|
+
{}
|
|
38
37
|
]
|
|
39
38
|
end
|
|
40
39
|
|
|
41
40
|
it 'performs the request' do
|
|
42
|
-
expect(client_double.cat.allocation).to eq({})
|
|
41
|
+
expect(client_double.cat.allocation(cluster_manager_timeout: 2)).to eq({})
|
|
43
42
|
end
|
|
44
43
|
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
#
|
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
|
5
|
+
# compatible open source license.
|
|
6
|
+
#
|
|
7
|
+
# Modifications Copyright OpenSearch Contributors. See
|
|
8
|
+
# GitHub history for details.
|
|
9
|
+
|
|
10
|
+
require 'spec_helper'
|
|
11
|
+
|
|
12
|
+
describe 'client.cat#cluster_manager' do
|
|
13
|
+
let(:expected_args) do
|
|
14
|
+
[
|
|
15
|
+
'GET',
|
|
16
|
+
'_cat/cluster_manager',
|
|
17
|
+
{},
|
|
18
|
+
nil,
|
|
19
|
+
{}
|
|
20
|
+
]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it 'performs the request' do
|
|
24
|
+
expect(client_double.cat.cluster_manager).to eq({})
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -49,11 +49,11 @@ describe 'client#get_script' do
|
|
|
49
49
|
context 'when the `lang` parameter is specificed' do
|
|
50
50
|
|
|
51
51
|
let(:params) do
|
|
52
|
-
{
|
|
52
|
+
{ cluster_manager_timeout: '1s' }
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
it 'performs the request' do
|
|
56
|
-
expect(client_double.get_script(
|
|
56
|
+
expect(client_double.get_script(cluster_manager_timeout: '1s', id: 'foo')).to eq({})
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
end
|
|
@@ -45,7 +45,6 @@ describe 'Hashie' do
|
|
|
45
45
|
"hits": [
|
|
46
46
|
{
|
|
47
47
|
"_index": "myindex",
|
|
48
|
-
"_type": "mytype",
|
|
49
48
|
"_id": "1",
|
|
50
49
|
"_score": 0.51104903,
|
|
51
50
|
"_source": {
|
|
@@ -63,7 +62,6 @@ describe 'Hashie' do
|
|
|
63
62
|
},
|
|
64
63
|
"facets": {
|
|
65
64
|
"tags": {
|
|
66
|
-
"_type": "terms",
|
|
67
65
|
"missing": 0,
|
|
68
66
|
"total": 10,
|
|
69
67
|
"other": 0,
|
|
@@ -88,7 +88,7 @@ describe 'client.indices#clone' do
|
|
|
88
88
|
let(:params) do
|
|
89
89
|
{
|
|
90
90
|
timeout: '1s',
|
|
91
|
-
|
|
91
|
+
cluster_manager_timeout: '10s',
|
|
92
92
|
wait_for_active_shards: 1
|
|
93
93
|
}
|
|
94
94
|
end
|
|
@@ -97,7 +97,7 @@ describe 'client.indices#clone' do
|
|
|
97
97
|
expect(client_double.indices.clone(index: 'my_source_index',
|
|
98
98
|
target: 'my_target_index',
|
|
99
99
|
timeout: '1s',
|
|
100
|
-
|
|
100
|
+
cluster_manager_timeout: '10s',
|
|
101
101
|
wait_for_active_shards: 1)).to eq({})
|
|
102
102
|
end
|
|
103
103
|
end
|
|
@@ -109,19 +109,19 @@ describe OpenSearch::API::Utils do
|
|
|
109
109
|
|
|
110
110
|
let(:result) do
|
|
111
111
|
utils.__bulkify [
|
|
112
|
-
{ :index => { :_index => 'myindexA', :
|
|
113
|
-
{ :update => { :_index => 'myindexB', :
|
|
114
|
-
{ :delete => { :_index => 'myindexC', :
|
|
112
|
+
{ :index => { :_index => 'myindexA', :_id => '1', :data => { :title => 'Test' } } },
|
|
113
|
+
{ :update => { :_index => 'myindexB', :_id => '2', :data => { :doc => { :title => 'Update' } } } },
|
|
114
|
+
{ :delete => { :_index => 'myindexC', :_id => '3' } }
|
|
115
115
|
]
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
let(:expected_string) do
|
|
119
119
|
<<-PAYLOAD.gsub(/^\s+/, '')
|
|
120
|
-
{"index":{"_index":"myindexA","
|
|
120
|
+
{"index":{"_index":"myindexA","_id":"1"}}
|
|
121
121
|
{"title":"Test"}
|
|
122
|
-
{"update":{"_index":"myindexB","
|
|
122
|
+
{"update":{"_index":"myindexB","_id":"2"}}
|
|
123
123
|
{"doc":{"title":"Update"}}
|
|
124
|
-
{"delete":{"_index":"myindexC","
|
|
124
|
+
{"delete":{"_index":"myindexC","_id":"3"}}
|
|
125
125
|
PAYLOAD
|
|
126
126
|
end
|
|
127
127
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opensearch-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jayesh Hathila
|
|
@@ -15,7 +15,7 @@ cert_chain:
|
|
|
15
15
|
-----BEGIN CERTIFICATE-----
|
|
16
16
|
MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRMwEQYDVQQDDApvcGVu
|
|
17
17
|
c2VhcmNoMRYwFAYKCZImiZPyLGQBGRYGYW1hem9uMRMwEQYKCZImiZPyLGQBGRYD
|
|
18
|
-
|
|
18
|
+
Y29tMB4XDTIyMDgxNzE3NTIzNFoXDTIzMDgxNzE3NTIzNFowQjETMBEGA1UEAwwK
|
|
19
19
|
b3BlbnNlYXJjaDEWMBQGCgmSJomT8ixkARkWBmFtYXpvbjETMBEGCgmSJomT8ixk
|
|
20
20
|
ARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM1z3/jcitjV
|
|
21
21
|
umXwRFn+JSBBd36qZB54Dtucf6+E2fmNPzBRhgYN5XJy/+clQJ9NIJV7C8H52P3V
|
|
@@ -26,14 +26,14 @@ cert_chain:
|
|
|
26
26
|
zfR37/NQFkECAwEAAaN9MHswCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
|
27
27
|
BBYEFJJ2myhLXK742btavNbG0IWrMNBIMCAGA1UdEQQZMBeBFW9wZW5zZWFyY2hA
|
|
28
28
|
YW1hem9uLmNvbTAgBgNVHRIEGTAXgRVvcGVuc2VhcmNoQGFtYXpvbi5jb20wDQYJ
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
KoZIhvcNAQEFBQADggEBAH5pWLYwKWFh1OjdCReGz/VEAiF4jXXputoN5Z8ga+1Z
|
|
30
|
+
lg8/diJf0PlP2B46PdmxH/TVc/o+qglNO2cHVEp8xZfEd83dfioOBeK90URQUpC5
|
|
31
|
+
UZmO0LZusg46SQKwKa2ukpIy2fNi3PeHRiV+W2Zv69GoWppyLun+fMez7wVoah2r
|
|
32
|
+
r5ROUYuAvFUvga1Vm+49pKiPM5n+MAYP5t/vWhgymY3SYQ1TfewkvKAFiFXikOR+
|
|
33
|
+
r+j7FLyKuk5DzIxiCp8QN5dU71BbGUmsHf/C5UV76WLPOFX/szeaHhPwpjR3sK7r
|
|
34
|
+
5zLgCV1KP7cgDdCYMlmZGeSViU8NV+Yy8/ghrzGpqVw=
|
|
35
35
|
-----END CERTIFICATE-----
|
|
36
|
-
date: 2022-
|
|
36
|
+
date: 2022-11-30 00:00:00.000000000 Z
|
|
37
37
|
dependencies:
|
|
38
38
|
- !ruby/object:Gem::Dependency
|
|
39
39
|
name: multi_json
|
|
@@ -317,7 +317,7 @@ dependencies:
|
|
|
317
317
|
version: '0'
|
|
318
318
|
description: 'Ruby API for OpenSearch. See the `opensearch` gem for full integration.
|
|
319
319
|
|
|
320
|
-
'
|
|
320
|
+
'
|
|
321
321
|
email:
|
|
322
322
|
- jayehh@amazon.com
|
|
323
323
|
- vamshin@amazon.com
|
|
@@ -341,6 +341,7 @@ files:
|
|
|
341
341
|
- lib/opensearch/api/actions/bulk.rb
|
|
342
342
|
- lib/opensearch/api/actions/cat/aliases.rb
|
|
343
343
|
- lib/opensearch/api/actions/cat/allocation.rb
|
|
344
|
+
- lib/opensearch/api/actions/cat/cluster_manager.rb
|
|
344
345
|
- lib/opensearch/api/actions/cat/count.rb
|
|
345
346
|
- lib/opensearch/api/actions/cat/fielddata.rb
|
|
346
347
|
- lib/opensearch/api/actions/cat/health.rb
|
|
@@ -529,6 +530,7 @@ files:
|
|
|
529
530
|
- spec/opensearch/api/actions/bulk_spec.rb
|
|
530
531
|
- spec/opensearch/api/actions/cat/aliases_spec.rb
|
|
531
532
|
- spec/opensearch/api/actions/cat/allocation_spec.rb
|
|
533
|
+
- spec/opensearch/api/actions/cat/cluster_manager_spec.rb
|
|
532
534
|
- spec/opensearch/api/actions/cat/count_spec.rb
|
|
533
535
|
- spec/opensearch/api/actions/cat/fielddata_spec.rb
|
|
534
536
|
- spec/opensearch/api/actions/cat/health_spec.rb
|
|
@@ -690,7 +692,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
690
692
|
- !ruby/object:Gem::Version
|
|
691
693
|
version: '0'
|
|
692
694
|
requirements: []
|
|
693
|
-
rubygems_version: 3.
|
|
695
|
+
rubygems_version: 3.3.26
|
|
694
696
|
signing_key:
|
|
695
697
|
specification_version: 4
|
|
696
698
|
summary: Ruby API for OpenSearch.
|
|
@@ -700,6 +702,7 @@ test_files:
|
|
|
700
702
|
- spec/opensearch/api/actions/bulk_spec.rb
|
|
701
703
|
- spec/opensearch/api/actions/cat/aliases_spec.rb
|
|
702
704
|
- spec/opensearch/api/actions/cat/allocation_spec.rb
|
|
705
|
+
- spec/opensearch/api/actions/cat/cluster_manager_spec.rb
|
|
703
706
|
- spec/opensearch/api/actions/cat/count_spec.rb
|
|
704
707
|
- spec/opensearch/api/actions/cat/fielddata_spec.rb
|
|
705
708
|
- spec/opensearch/api/actions/cat/health_spec.rb
|
metadata.gz.sig
CHANGED
|
Binary file
|