Class MgetRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.MgetRequest
- All Implemented Interfaces:
JsonpSerializable
Allows to get multiple documents in one request.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<MgetRequest>
Json deserializer forMgetRequest
static final SimpleEndpoint<MgetRequest,
?> Endpoint "mget
". -
Method Summary
Modifier and TypeMethodDescriptionstatic <TDocument>
Endpoint<MgetRequest,MgetResponse<TDocument>, ErrorResponse> createMgetEndpoint
(JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "mget
" endpoint.final List<MultiGetOperation>
docs()
The documents you want to retrieve.final Boolean
Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.ids()
The IDs of the documents you want to retrieve.final String
index()
Name of the index to retrieve documents from whenids
are specified, or when a document in thedocs
array does not specify an index.static MgetRequest
final String
Specifies the node or shard the operation should be performed on.final Boolean
realtime()
Iftrue
, the request is real-time as opposed to near-real-time.final Boolean
refresh()
Iftrue
, the request refreshes relevant shards before retrieving documents.final String
routing()
Custom value used to route operations to a specific shard.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final SourceConfigParam
source()
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.A comma-separated list of source fields to include in the response.Iftrue
, retrieves the document fields stored in the index rather than the document_source
.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forMgetRequest
-
_ENDPOINT
Endpoint "mget
".
-
-
Method Details
-
of
-
source
True or false to return the_source
field or not, or a list of fields to return.API name:
_source
-
sourceExcludes
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.API name:
_source_excludes
-
sourceIncludes
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.API name:
_source_includes
-
docs
The documents you want to retrieve. Required if no index is specified in the request URI.API name:
docs
-
forceSyntheticSource
Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.API name:
force_synthetic_source
-
ids
The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.API name:
ids
-
index
Name of the index to retrieve documents from whenids
are specified, or when a document in thedocs
array does not specify an index.API name:
index
-
preference
Specifies the node or shard the operation should be performed on. Random by default.API name:
preference
-
realtime
Iftrue
, the request is real-time as opposed to near-real-time.API name:
realtime
-
refresh
Iftrue
, the request refreshes relevant shards before retrieving documents.API name:
refresh
-
routing
Custom value used to route operations to a specific shard.API name:
routing
-
storedFields
Iftrue
, retrieves the document fields stored in the index rather than the document_source
.API name:
stored_fields
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupMgetRequestDeserializer
-
createMgetEndpoint
public static <TDocument> Endpoint<MgetRequest,MgetResponse<TDocument>, createMgetEndpointErrorResponse> (JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "mget
" endpoint.
-