Method: Elasticsearch::API::Indices::Actions#get
- Defined in:
- lib/elasticsearch/api/actions/indices/get.rb
#get(arguments = {}) ⇒ Object
Get index information. Get information about one or more indices. For data streams, the API returns information about the stream’s backing indices.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/elasticsearch/api/actions/indices/get.rb', line 58 def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'indices.get' } defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = Utils.listify(_index).to_s params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |