module Elasticsearch::XPack::API::SearchableSnapshots::Actions
Public Instance Methods
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.
@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 @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/searchable-snapshots-apis.html
# 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 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.
@option arguments [List] :index A comma-separated list of index names @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) @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) @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all) @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/searchable-snapshots-apis.html
# 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 a snapshot as a searchable index. 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.
@option arguments [String] :repository The name of the repository containing the snapshot of the index to mount @option arguments [String] :snapshot The name of the snapshot of the index to mount @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning @option arguments [String] :storage Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The restore configuration for mounting the snapshot as searchable (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/searchable-snapshots-api-mount-snapshot.html
# File lib/elasticsearch/xpack/api/actions/searchable_snapshots/mount.rb, line 39 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
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.
@option arguments [String] :repository The repository for which to get the stats for @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/searchable-snapshots-apis.html
# 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
Retrieve shard-level 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.
@option arguments [List] :index A comma-separated list of index names @option arguments [String] :level Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards) @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/searchable-snapshots-apis.html
# File lib/elasticsearch/xpack/api/actions/searchable_snapshots/stats.rb, line 35 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