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:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBulkRequest.BuilderBuilder forBulkRequest.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 Endpoint<BulkRequest,BulkResponse,ErrorResponse>_ENDPOINTEndpoint "bulk". -
Method Summary
Modifier and Type Method Description java.util.Iterator<?>_serializables()java.lang.Stringindex()Default index for items which don't provide onestatic BulkRequestof(java.util.function.Function<BulkRequest.Builder,ObjectBuilder<BulkRequest>> fn)java.util.List<BulkOperation>operations()Required - Request body.java.lang.Stringpipeline()The pipeline id to preprocess incoming documents withRefreshrefresh()Iftruethen refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalse(the default) then do nothing with refreshes.java.lang.BooleanrequireAlias()Sets require_alias for all incoming documents.java.lang.Stringrouting()Specific routing valuevoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this value to JSON.SourceConfigParamsource()True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-requestjava.util.List<java.lang.String>sourceExcludes()Default list of fields to exclude from the returned _source field, can be overridden on each sub-requestjava.util.List<java.lang.String>sourceIncludes()Default list of fields to extract and return from the _source field, can be overridden on each sub-requestTimetimeout()Explicit operation timeoutjava.lang.Stringtype()Default document type for items which don't provide oneWaitForActiveShardswaitForActiveShards()Sets the number of shard copies that must be active before proceeding with the bulk operation.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_ENDPOINT
Endpoint "bulk".
-
-
Method Details
-
of
public static BulkRequest of(java.util.function.Function<BulkRequest.Builder,ObjectBuilder<BulkRequest>> fn) -
_serializables
public java.util.Iterator<?> _serializables()- Specified by:
_serializablesin interfaceNdJsonpSerializable
-
source
True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-requestAPI name:
_source -
sourceExcludes
public final java.util.List<java.lang.String> sourceExcludes()Default list of fields to exclude from the returned _source field, can be overridden on each sub-requestAPI name:
_source_excludes -
sourceIncludes
public final java.util.List<java.lang.String> sourceIncludes()Default list of fields to extract and return from the _source field, can be overridden on each sub-requestAPI name:
_source_includes -
index
@Nullable public final java.lang.String index()Default index for items which don't provide oneAPI name:
index -
pipeline
@Nullable public final java.lang.String pipeline()The pipeline id to preprocess incoming documents withAPI name:
pipeline -
refresh
Iftruethen refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalse(the default) then do nothing with refreshes.API name:
refresh -
requireAlias
@Nullable public final java.lang.Boolean requireAlias()Sets require_alias for all incoming documents. Defaults to unset (false)API name:
require_alias -
routing
@Nullable public final java.lang.String routing()Specific routing valueAPI name:
routing -
timeout
Explicit operation timeoutAPI name:
timeout -
type
@Nullable public final java.lang.String type()Default document type for items which don't provide oneAPI name:
type -
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 toallfor 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
Required - Request body. -
serialize
Serialize this value to JSON.- Specified by:
serializein interfaceJsonpSerializable
-