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 classMgetRequest.BuilderBuilder 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>_DESERIALIZERJson deserializer forMgetRequeststatic SimpleEndpoint<MgetRequest,?>_ENDPOINTEndpoint "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:docsjava.util.List<java.lang.String>ids()API name:idsjava.lang.Stringindex()The name of the indexstatic MgetRequestof(java.util.function.Function<MgetRequest.Builder,ObjectBuilder<MgetRequest>> fn)java.lang.Stringpreference()Specify the node or shard the operation should be performed on (default: random)java.lang.Booleanrealtime()Specify whether to perform the operation in realtime or search modejava.lang.Booleanrefresh()Refresh the shard containing the document before performing the operationjava.lang.Stringrouting()Specific routing valuevoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupMgetRequestDeserializer(ObjectDeserializer<MgetRequest.Builder> op)SourceConfigParamsource()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.Stringtype()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:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupMgetRequestDeserializer
-
createMgetEndpoint
public static <TDocument> Endpoint<MgetRequest,MgetResponse<TDocument>,ErrorResponse> createMgetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "mget" endpoint.
-