Class BulkRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<BulkRequest.Builder>
co.elastic.clients.elasticsearch.core.BulkRequest.Builder
- All Implemented Interfaces:
WithJson<BulkRequest.Builder>,ObjectBuilder<BulkRequest>
- Enclosing class:
- BulkRequest
public static class BulkRequest.Builder
extends RequestBase.AbstractBuilder<BulkRequest.Builder>
implements ObjectBuilder<BulkRequest>
Builder for
BulkRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aBulkRequest.final BulkRequest.BuilderName of the data stream, index, or index alias to perform bulk actions on.final BulkRequest.Builderoperations(BulkOperation value, BulkOperation... values) Required - Request body.final BulkRequest.BuilderRequired - Request body.final BulkRequest.Builderoperations(List<BulkOperation> list) Required - Request body.final BulkRequest.BuilderID of the pipeline to use to preprocess incoming documents.final BulkRequest.BuilderIftrue, Elasticsearch refreshes the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsedo nothing with refreshes.final BulkRequest.BuilderrequireAlias(Boolean value) Iftrue, the request’s actions must target an index alias.final BulkRequest.BuilderCustom value used to route operations to a specific shard.protected BulkRequest.Builderself()final BulkRequest.Buildersource(SourceConfigParam value) trueorfalseto return the_sourcefield or not, or a list of fields to return.final BulkRequest.Buildertrueorfalseto return the_sourcefield or not, or a list of fields to return.final BulkRequest.BuildersourceExcludes(String value, String... values) A comma-separated list of source fields to exclude from the response.final BulkRequest.BuildersourceExcludes(List<String> list) A comma-separated list of source fields to exclude from the response.final BulkRequest.BuildersourceIncludes(String value, String... values) A comma-separated list of source fields to include in the response.final BulkRequest.BuildersourceIncludes(List<String> list) A comma-separated list of source fields to include in the response.final BulkRequest.BuilderPeriod each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.final BulkRequest.BuilderPeriod each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.final BulkRequest.BuilderThe number of shard copies that must be active before proceeding with the operation.final BulkRequest.BuilderThe number of shard copies that must be active before proceeding with the operation.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
source
trueorfalseto return the_sourcefield or not, or a list of fields to return.API name:
_source -
source
public final BulkRequest.Builder source(Function<SourceConfigParam.Builder, ObjectBuilder<SourceConfigParam>> fn) trueorfalseto return the_sourcefield 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_excludesAdds all elements of
listtosourceExcludes. -
sourceExcludes
A comma-separated list of source fields to exclude from the response.API name:
_source_excludesAdds one or more values to
sourceExcludes. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includesAdds all elements of
listtosourceIncludes. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includesAdds one or more values to
sourceIncludes. -
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_nonedisables 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_forthen wait for a refresh to make this operation visible to search, iffalsedo 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 -
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 -
waitForActiveShards
public final BulkRequest.Builder waitForActiveShards(Function<WaitForActiveShards.Builder, ObjectBuilder<WaitForActiveShards>> fn) 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.Adds all elements of
listtooperations. -
operations
Required - Request body.Adds one or more values to
operations. -
operations
public final BulkRequest.Builder operations(Function<BulkOperation.Builder, ObjectBuilder<BulkOperation>> fn) Required - Request body.Adds a value to
operationsusing a builder lambda. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<BulkRequest.Builder>
-
build
Builds aBulkRequest.- Specified by:
buildin interfaceObjectBuilder<BulkRequest>- Throws:
NullPointerException- if some of the required fields are null.
-