Class BulkRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.BulkRequest
- All Implemented Interfaces:
JsonpSerializable
,NdJsonpSerializable
Performs multiple indexing or delete operations in a single API call. This
reduces overhead and can greatly increase indexing speed.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Endpoint<BulkRequest,
BulkResponse, ErrorResponse> Endpoint "bulk
". -
Method Summary
Modifier and TypeMethodDescriptionIterator<?>
final String
index()
Name of the data stream, index, or index alias to perform bulk actions on.static BulkRequest
final List<BulkOperation>
Required - Request body.final String
pipeline()
ID of the pipeline to use to preprocess incoming documents.final Refresh
refresh()
Iftrue
, Elasticsearch refreshes the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
do nothing with refreshes.final Boolean
Iftrue
, the request’s actions must target an index alias.final String
routing()
Custom value used to route operations to a specific shard.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this value to JSON.final SourceConfigParam
source()
true
orfalse
to return the_source
field or not, or a list of fields to return.A comma-separated list of source fields to exclude from the response.A comma-separated list of source fields to include in the response.final Time
timeout()
Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.final WaitForActiveShards
The number of shard copies that must be active before proceeding with the operation.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_ENDPOINT
Endpoint "bulk
".
-
-
Method Details
-
of
-
_serializables
- Specified by:
_serializables
in interfaceNdJsonpSerializable
-
source
true
orfalse
to return the_source
field or not, or a list of fields to return.API name:
_source
-
sourceExcludes
A comma-separated list of source fields to exclude from the response.API name:
_source_excludes
-
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includes
-
index
Name of the data stream, index, or index alias to perform bulk actions on.API name:
index
-
pipeline
ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to_none
disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.API name:
pipeline
-
refresh
Iftrue
, Elasticsearch refreshes the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
do nothing with refreshes. Valid values:true
,false
,wait_for
.API name:
refresh
-
requireAlias
Iftrue
, the request’s actions must target an index alias.API name:
require_alias
-
routing
Custom value used to route operations to a specific shard.API name:
routing
-
timeout
Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.API name:
timeout
-
waitForActiveShards
The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1
).API name:
wait_for_active_shards
-
operations
Required - Request body. -
serialize
Serialize this value to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-