in opensearch-api/lib/opensearch/api/actions/explain.rb [55:85]
def explain(arguments = {})
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
headers = arguments.delete(:headers) || {}
arguments = arguments.clone
_id = arguments.delete(:id)
_index = arguments.delete(:index)
_type = arguments.delete(:type)
method = if arguments[:body]
OpenSearch::API::HTTP_POST
else
OpenSearch::API::HTTP_GET
end
path = if _index && _type && _id
"#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}/_explain"
else
"#{Utils.__listify(_index)}/_explain/#{Utils.__listify(_id)}"
end
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
body = arguments[:body]
perform_request(method, path, params, body, headers).body
end