Method: Elasticsearch::API::Cluster::Actions#reroute
- Defined in:
- lib/elasticsearch/api/actions/cluster/reroute.rb
permalink #reroute(arguments = {}) ⇒ Object
Allows to manually change the allocation of individual shards in the cluster.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/elasticsearch/api/actions/cluster/reroute.rb', line 38 def reroute(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.reroute' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) || {} method = Elasticsearch::API::HTTP_POST path = '_cluster/reroute' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |