mget

edit
client.mget({
  index: string,
  type: string,
  stored_fields: string | string[],
  preference: string,
  realtime: boolean,
  refresh: boolean,
  routing: string,
  _source: string | string[],
  _source_exclude: string | string[],
  _source_include: string | string[],
  body: object
})

Reference

index

string - The name of the index

type

string - The type of the document

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return in the response

preference

string - Specify the node or shard the operation should be performed on (default: random)

realtime

boolean - Specify whether to perform the operation in realtime or search mode

refresh

boolean - Refresh the shard containing the document before performing the operation

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_exclude or _sourceExclude

string | string[] - A list of fields to exclude from the returned _source field

_source_include or _sourceInclude

string | string[] - A list of fields to extract and return from the _source field

body

object - Document identifiers; can be either docs (containing full document information) or ids (when index and type is provided in the URL.