Method: Elasticsearch::API::Cluster::Actions#allocation_explain
- Defined in:
- lib/elasticsearch/api/actions/cluster/allocation_explain.rb
#allocation_explain(arguments = {}) ⇒ Object
Provides explanations for shard allocations in the cluster.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cluster/allocation_explain.rb', line 35 def allocation_explain(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cluster.allocation_explain' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = '_cluster/allocation/explain' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |