Class MgetRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.core.MgetRequest
-
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class MgetRequest extends RequestBase implements JsonpSerializable
Allows to get multiple documents in one request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMgetRequest.BuilderBuilder forMgetRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._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
All Methods Static Methods Instance Methods Concrete Methods 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 response
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<MgetRequest> _DESERIALIZER
Json deserializer forMgetRequest
-
_ENDPOINT
public static final SimpleEndpoint<MgetRequest,?> _ENDPOINT
Endpoint "mget".
-
-
Method Detail
-
of
public static MgetRequest of(java.util.function.Function<MgetRequest.Builder,ObjectBuilder<MgetRequest>> fn)
-
source
@Nullable public final SourceConfigParam 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
public final java.util.List<MultiGetOperation> 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
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupMgetRequestDeserializer
protected static void setupMgetRequestDeserializer(ObjectDeserializer<MgetRequest.Builder> op)
-
createMgetEndpoint
public static <TDocument> Endpoint<MgetRequest,MgetResponse<TDocument>,ErrorResponse> createMgetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)
Create an "mget" endpoint.
-
-