Class BulkRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.BulkRequest
All Implemented Interfaces:
JsonpSerializable, NdJsonpSerializable

public class BulkRequest extends RequestBase implements NdJsonpSerializable, JsonpSerializable
Allows to perform multiple index/update/delete operations in a single request.
See Also:
  • Field Details

  • Method Details

    • of

    • _serializables

      public Iterator<?> _serializables()
      Specified by:
      _serializables in interface NdJsonpSerializable
    • source

      @Nullable public final SourceConfigParam source()
      True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request

      API name: _source

    • sourceExcludes

      public final List<String> sourceExcludes()
      Default list of fields to exclude from the returned _source field, can be overridden on each sub-request

      API name: _source_excludes

    • sourceIncludes

      public final List<String> sourceIncludes()
      Default list of fields to extract and return from the _source field, can be overridden on each sub-request

      API name: _source_includes

    • index

      @Nullable public final String index()
      Default index for items which don't provide one

      API name: index

    • pipeline

      @Nullable public final String pipeline()
      The pipeline id to preprocess incoming documents with

      API name: pipeline

    • refresh

      @Nullable public final Refresh refresh()
      If true then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false (the default) then do nothing with refreshes.

      API name: refresh

    • requireAlias

      @Nullable public final Boolean requireAlias()
      Sets require_alias for all incoming documents. Defaults to unset (false)

      API name: require_alias

    • routing

      @Nullable public final String routing()
      Specific routing value

      API name: routing

    • timeout

      @Nullable public final Time timeout()
      Explicit operation timeout

      API name: timeout

    • waitForActiveShards

      @Nullable public final WaitForActiveShards waitForActiveShards()
      Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to all for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)

      API name: wait_for_active_shards

    • operations

      public final List<BulkOperation> operations()
      Required - Request body.
    • serialize

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