Get multiple documents | Elasticsearch API documentation (original) (raw)
Dismiss highlight Show more
Query parameters
- Specifies the node or shard the operation should be performed on. Random by default.
- If
true
, the request is real-time as opposed to near-real-time. - If
true
, the request refreshes relevant shards before retrieving documents. - Custom value used to route operations to a specific shard.
- _source
boolean | string | array[string]
True or false to return the_source
field or not, or a list of fields to return. - A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in
_source_includes
query parameter. - A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the
_source_excludes
query parameter. If the_source
parameter isfalse
, this parameter is ignored. - If
true
, retrieves the document fields stored in the index rather than the document_source
.
application/json
Body Required
- The documents you want to retrieve. Required if no index is specified in the request URI.
Hide docs attributes Show docs attributes object_source boolean | object
Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
- Values are
internal
,external
,external_gte
, orforce
.
ids string | array[string]
Responses
- 200 application/json
Hide response attribute Show response attribute object- docs
array[object] Required
The response includes a docs array that contains the documents in the order specified in the request. The structure of the returned documents is similar to that returned by the get API. If there is a failure getting a particular document, the error is included in place of the document.
- docs