Class MgetRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.MgetRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class MgetRequest extends RequestBase implements JsonpSerializable
Allows to get multiple documents in one request.
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MgetRequest.Builder
Builder forMgetRequest
.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<MgetRequest>
_DESERIALIZER
Json deserializer forMgetRequest
static SimpleEndpoint<MgetRequest,?>
_ENDPOINT
Endpoint "mget
". -
Method Summary
Modifier and Type Method Description static <TDocument>
Endpoint<MgetRequest,MgetResponse<TDocument>,ErrorResponse>createMgetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)
Create an "mget
" endpoint.java.util.List<MultiGetOperation>
docs()
API name:docs
java.util.List<java.lang.String>
ids()
API name:ids
java.lang.String
index()
The name of the indexstatic MgetRequest
of(java.util.function.Function<MgetRequest.Builder,ObjectBuilder<MgetRequest>> fn)
java.lang.String
preference()
Specify the node or shard the operation should be performed on (default: random)java.lang.Boolean
realtime()
Specify whether to perform the operation in realtime or search modejava.lang.Boolean
refresh()
Refresh the shard containing the document before performing the operationjava.lang.String
routing()
Specific routing valuevoid
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
setupMgetRequestDeserializer(ObjectDeserializer<MgetRequest.Builder> op)
SourceConfigParam
source()
True or false to return the _source field or not, or a list of fields to returnjava.util.List<java.lang.String>
sourceExcludes()
A list of fields to exclude from the returned _source fieldjava.util.List<java.lang.String>
sourceIncludes()
A list of fields to extract and return from the _source fieldjava.util.List<java.lang.String>
storedFields()
A comma-separated list of stored fields to return in the responsejava.lang.String
type()
The type of the documentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forMgetRequest
-
_ENDPOINT
Endpoint "mget
".
-
-
Method Details
-
of
public static MgetRequest of(java.util.function.Function<MgetRequest.Builder,ObjectBuilder<MgetRequest>> fn) -
source
True or false to return the _source field or not, or a list of fields to returnAPI name:
_source
-
sourceExcludes
public final java.util.List<java.lang.String> sourceExcludes()A list of fields to exclude from the returned _source fieldAPI name:
_source_excludes
-
sourceIncludes
public final java.util.List<java.lang.String> sourceIncludes()A list of fields to extract and return from the _source fieldAPI name:
_source_includes
-
docs
API name:docs
-
ids
public final java.util.List<java.lang.String> ids()API name:ids
-
index
@Nullable public final java.lang.String index()The name of the indexAPI name:
index
-
preference
@Nullable public final java.lang.String preference()Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
realtime
@Nullable public final java.lang.Boolean realtime()Specify whether to perform the operation in realtime or search modeAPI name:
realtime
-
refresh
@Nullable public final java.lang.Boolean refresh()Refresh the shard containing the document before performing the operationAPI name:
refresh
-
routing
@Nullable public final java.lang.String routing()Specific routing valueAPI name:
routing
-
storedFields
public final java.util.List<java.lang.String> storedFields()A comma-separated list of stored fields to return in the responseAPI name:
stored_fields
-
type
@Nullable public final java.lang.String type()The type of the documentAPI name:
type
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupMgetRequestDeserializer
-
createMgetEndpoint
public static <TDocument> Endpoint<MgetRequest,MgetResponse<TDocument>,ErrorResponse> createMgetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "mget
" endpoint.
-