Method: OpenSearch::API::Actions#get_source
- Defined in:
- lib/opensearch/api/actions/get_source.rb
#get_source(arguments = {}) ⇒ Object
Returns the source of a document.
*Deprecation notice*: Specifying types in urls has been deprecated Deprecated since version 7.0.0
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/opensearch/api/actions/get_source.rb', line 51 def get_source(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) method = OpenSearch::API::HTTP_GET path = "#{Utils.__listify(_index)}/_source/#{Utils.__listify(_id)}" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |