Module: Elasticsearch::XPack::API::Indices::Actions
- Included in:
- IndicesClient
- Defined in:
- lib/elasticsearch/xpack/api/namespace/indices.rb,
lib/elasticsearch/xpack/api/actions/indices/freeze.rb,
lib/elasticsearch/xpack/api/actions/indices/unfreeze.rb,
lib/elasticsearch/xpack/api/actions/indices/get_data_stream.rb,
lib/elasticsearch/xpack/api/actions/indices/params_registry.rb,
lib/elasticsearch/xpack/api/actions/indices/create_data_stream.rb,
lib/elasticsearch/xpack/api/actions/indices/data_streams_stats.rb,
lib/elasticsearch/xpack/api/actions/indices/delete_data_stream.rb,
lib/elasticsearch/xpack/api/actions/indices/modify_data_stream.rb,
lib/elasticsearch/xpack/api/actions/indices/promote_data_stream.rb,
lib/elasticsearch/xpack/api/actions/indices/migrate_to_data_stream.rb,
lib/elasticsearch/xpack/api/actions/indices/reload_search_analyzers.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#create_data_stream(arguments = {}) ⇒ Object
Creates a data stream.
-
#data_streams_stats(arguments = {}) ⇒ Object
Provides statistics on operations happening in a data stream.
-
#delete_data_stream(arguments = {}) ⇒ Object
Deletes a data stream.
-
#freeze(arguments = {}) ⇒ Object
Freezes an index.
-
#get_data_stream(arguments = {}) ⇒ Object
Returns data streams.
-
#migrate_to_data_stream(arguments = {}) ⇒ Object
Migrates an alias to a data stream.
-
#modify_data_stream(arguments = {}) ⇒ Object
Modifies a data stream.
-
#promote_data_stream(arguments = {}) ⇒ Object
Promotes a data stream from a replicated data stream managed by CCR to a regular data stream.
-
#reload_search_analyzers(arguments = {}) ⇒ Object
Reloads an index’s search analyzers and their resources.
-
#unfreeze(arguments = {}) ⇒ Object
Unfreezes an index.
Instance Method Details
#create_data_stream(arguments = {}) ⇒ Object
Creates a data stream
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/elasticsearch/xpack/api/actions/indices/create_data_stream.rb', line 30 def create_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_data_stream/#{Elasticsearch::API::Utils.__listify(_name)}" params = {} body = nil perform_request(method, path, params, body, headers).body end |
#data_streams_stats(arguments = {}) ⇒ Object
Provides statistics on operations happening in a data stream.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/elasticsearch/xpack/api/actions/indices/data_streams_stats.rb', line 30 def data_streams_stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = if _name "_data_stream/#{Elasticsearch::API::Utils.__listify(_name)}/_stats" else "_data_stream/_stats" end params = {} body = nil perform_request(method, path, params, body, headers).body end |
#delete_data_stream(arguments = {}) ⇒ Object
Deletes a data stream.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/elasticsearch/xpack/api/actions/indices/delete_data_stream.rb', line 31 def delete_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_data_stream/#{Elasticsearch::API::Utils.__listify(_name)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#freeze(arguments = {}) ⇒ Object
Freezes an index. A frozen index has almost no overhead on the cluster (except for maintaining its metadata in memory) and is read-only.
*Deprecation notice*: Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release. Deprecated since version 7.14.0
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/xpack/api/actions/indices/freeze.rb', line 41 def freeze(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = "#{Elasticsearch::API::Utils.__listify(_index)}/_freeze" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#get_data_stream(arguments = {}) ⇒ Object
Returns data streams.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/xpack/api/actions/indices/get_data_stream.rb', line 31 def get_data_stream(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = if _name "_data_stream/#{Elasticsearch::API::Utils.__listify(_name)}" else "_data_stream" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#migrate_to_data_stream(arguments = {}) ⇒ Object
Migrates an alias to a data stream
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/elasticsearch/xpack/api/actions/indices/migrate_to_data_stream.rb', line 30 def migrate_to_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST path = "_data_stream/_migrate/#{Elasticsearch::API::Utils.__listify(_name)}" params = {} body = nil perform_request(method, path, params, body, headers).body end |
#modify_data_stream(arguments = {}) ⇒ Object
Modifies a data stream
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/elasticsearch/xpack/api/actions/indices/modify_data_stream.rb', line 30 def modify_data_stream(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_data_stream/_modify" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end |
#promote_data_stream(arguments = {}) ⇒ Object
Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/elasticsearch/xpack/api/actions/indices/promote_data_stream.rb', line 30 def promote_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] headers = arguments.delete(:headers) || {} arguments = arguments.clone _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST path = "_data_stream/_promote/#{Elasticsearch::API::Utils.__listify(_name)}" params = {} body = nil perform_request(method, path, params, body, headers).body end |
#reload_search_analyzers(arguments = {}) ⇒ Object
Reloads an index’s search analyzers and their resources.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/xpack/api/actions/indices/reload_search_analyzers.rb', line 33 def reload_search_analyzers(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = "#{Elasticsearch::API::Utils.__listify(_index)}/_reload_search_analyzers" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#unfreeze(arguments = {}) ⇒ Object
Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.
*Deprecation notice*: Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release. Deprecated since version 7.14.0
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/xpack/api/actions/indices/unfreeze.rb', line 41 def unfreeze(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = "#{Elasticsearch::API::Utils.__listify(_index)}/_unfreeze" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |