Module: Elasticsearch::XPack::API::SearchableSnapshots::Actions
- Included in:
- SearchableSnapshotsClient
- Defined in:
- lib/elasticsearch/xpack/api/namespace/searchable_snapshots.rb,
lib/elasticsearch/xpack/api/actions/searchable_snapshots/mount.rb,
lib/elasticsearch/xpack/api/actions/searchable_snapshots/stats.rb,
lib/elasticsearch/xpack/api/actions/searchable_snapshots/cache_stats.rb,
lib/elasticsearch/xpack/api/actions/searchable_snapshots/clear_cache.rb,
lib/elasticsearch/xpack/api/actions/searchable_snapshots/params_registry.rb,
lib/elasticsearch/xpack/api/actions/searchable_snapshots/repository_stats.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#cache_stats(arguments = {}) ⇒ Object
Retrieve node-level cache statistics about searchable snapshots.
-
#clear_cache(arguments = {}) ⇒ Object
Clear the cache of searchable snapshots.
-
#mount(arguments = {}) ⇒ Object
Mount a snapshot as a searchable index.
-
#repository_stats(arguments = {}) ⇒ Object
DEPRECATED: This API is replaced by the Repositories Metering API.
-
#stats(arguments = {}) ⇒ Object
Retrieve shard-level statistics about searchable snapshots.
Instance Method Details
#cache_stats(arguments = {}) ⇒ Object
Retrieve node-level cache statistics about searchable snapshots. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/elasticsearch/xpack/api/actions/searchable_snapshots/cache_stats.rb', line 34 def cache_stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET path = if _node_id "_searchable_snapshots/#{Elasticsearch::API::Utils.__listify(_node_id)}/cache/stats" else "_searchable_snapshots/cache/stats" end params = {} body = nil perform_request(method, path, params, body, headers).body end |
#clear_cache(arguments = {}) ⇒ Object
Clear the cache of searchable snapshots. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/elasticsearch/xpack/api/actions/searchable_snapshots/clear_cache.rb', line 37 def clear_cache(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = if _index "#{Elasticsearch::API::Utils.__listify(_index)}/_searchable_snapshots/cache/clear" else "_searchable_snapshots/cache/clear" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#mount(arguments = {}) ⇒ Object
Mount a snapshot as a searchable index.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/elasticsearch/xpack/api/actions/searchable_snapshots/mount.rb', line 35 def mount(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] headers = arguments.delete(:headers) || {} arguments = arguments.clone _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) method = Elasticsearch::API::HTTP_POST path = "_snapshot/#{Elasticsearch::API::Utils.__listify(_repository)}/#{Elasticsearch::API::Utils.__listify(_snapshot)}/_mount" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end |
#repository_stats(arguments = {}) ⇒ Object
DEPRECATED: This API is replaced by the Repositories Metering API. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/xpack/api/actions/searchable_snapshots/repository_stats.rb', line 34 def repository_stats(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] headers = arguments.delete(:headers) || {} arguments = arguments.clone _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_GET path = "_snapshot/#{Elasticsearch::API::Utils.__listify(_repository)}/_stats" params = {} body = nil perform_request(method, path, params, body, headers).body end |
#stats(arguments = {}) ⇒ Object
Retrieve shard-level statistics about searchable snapshots.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/xpack/api/actions/searchable_snapshots/stats.rb', line 31 def stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index "#{Elasticsearch::API::Utils.__listify(_index)}/_searchable_snapshots/stats" else "_searchable_snapshots/stats" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |