elasticsearch-api/lib/elasticsearch/api/actions/mget.rb
def mget(arguments = {})
        raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

        headers = arguments.delete(:headers) || {}

        body = arguments.delete(:body)

        arguments = arguments.clone

        _index = arguments.delete(:index)

        method = Elasticsearch::API::HTTP_POST
        path   = if _index
                   "#{Utils.__listify(_index)}/_mget"
                 else
                   "_mget"
                 end
        params = Utils.process_params(arguments)

        perform_request(method, path, params, body, headers).body
      end
# Allows to get multiple documents in one request.
#
# @option arguments [String] :index The name of the index
# @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
# @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode
# @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation
# @option arguments [String] :routing Specific routing value
# @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
# @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
# @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. (*Required*)
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
#
Allows to get multiple documents in one request.
Allows to get multiple documents in one request .
def mget(arguments = {})
        raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
        headers = arguments.delete(:headers) || {}
        body = arguments.delete(:body)
        arguments = arguments.clone
        _index = arguments.delete(:index)
        method = Elasticsearch::API::HTTP_POST
        path   = if _index
                   "#{Utils.__listify(_index)}/_mget"
                 else
                   "_mget"
                 end
        params = Utils.process_params(arguments)
        perform_request(method, path, params, body, headers).body
      end
def mget ( arguments = { } ) raise ArgumentError , "Required argument 'body' missing" unless arguments [ :body ] headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone _index = arguments . delete ( :index ) method = Elasticsearch :: API :: HTTP_POST path = if _index "#{Utils.__listify(_index)}/_mget" else "_mget" end params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Allows to get multiple documents in one request.
Allows to get multiple documents in one request .
arguments
:body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. (*Required*)
: body Document identifiers ; can be either ` docs ` ( containing full document information ) or ` ids ` ( when index is provided in the URL . ( * Required * )
see
None