Class MgetRequest

java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.core.MgetRequest
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable

@JsonpDeserializable public class MgetRequest extends RequestBase implements PlainJsonSerializable
Allows to get multiple documents in one request.
  • Field Details

  • Method Details

    • of

    • source

      @Nullable public final SourceConfigParam source()
      True or false to return the _source field or not, or a list of fields to return

      API name: _source

    • sourceExcludes

      public final List<String> sourceExcludes()
      A list of fields to exclude from the returned _source field

      API name: _source_excludes

    • sourceIncludes

      public final List<String> sourceIncludes()
      A list of fields to extract and return from the _source field

      API name: _source_includes

    • docs

      public final List<MultiGetOperation> docs()
      API name: docs
    • ids

      public final List<String> ids()
      API name: ids
    • index

      @Nullable public final String index()
      The name of the index

      API name: index

    • preference

      @Nullable public final String preference()
      Specify the node or shard the operation should be performed on (default: random)

      API name: preference

    • realtime

      @Nullable public final Boolean realtime()
      Specify whether to perform the operation in realtime or search mode

      API name: realtime

    • refresh

      @Nullable public final Boolean refresh()
      Refresh the shard containing the document before performing the operation

      API name: refresh

    • routing

      @Nullable public final String routing()
      Specific routing value

      API name: routing

    • storedFields

      public final List<String> storedFields()
      A comma-separated list of stored fields to return in the response

      API name: stored_fields

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      public MgetRequest.Builder toBuilder()
    • 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.