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.BuilderDefault index for items which don't provide onefinal 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.BuilderThe pipeline id to preprocess incoming documents withfinal BulkRequest.BuilderIftruethen 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.final BulkRequest.BuilderrequireAlias(Boolean value) Sets require_alias for all incoming documents.final BulkRequest.BuilderSpecific routing valueprotected BulkRequest.Builderself()final BulkRequest.Buildersource(SourceConfigParam value) True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-requestfinal BulkRequest.BuilderTrue or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-requestfinal BulkRequest.BuildersourceExcludes(String value, String... values) Default list of fields to exclude from the returned _source field, can be overridden on each sub-requestfinal BulkRequest.BuildersourceExcludes(List<String> list) Default list of fields to exclude from the returned _source field, can be overridden on each sub-requestfinal BulkRequest.BuildersourceIncludes(String value, String... values) Default list of fields to extract and return from the _source field, can be overridden on each sub-requestfinal BulkRequest.BuildersourceIncludes(List<String> list) Default list of fields to extract and return from the _source field, can be overridden on each sub-requestfinal BulkRequest.BuilderExplicit operation timeoutfinal BulkRequest.BuilderExplicit operation timeoutfinal BulkRequest.BuilderDefault document type for items which don't provide onefinal BulkRequest.BuilderSets the number of shard copies that must be active before proceeding with the bulk operation.final BulkRequest.BuilderSets the number of shard copies that must be active before proceeding with the bulk 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
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 -
source
public final BulkRequest.Builder source(Function<SourceConfigParam.Builder, ObjectBuilder<SourceConfigParam>> fn) 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
Default list of fields to exclude from the returned _source field, can be overridden on each sub-requestAPI name:
_source_excludesAdds all elements of
listtosourceExcludes. -
sourceExcludes
Default list of fields to exclude from the returned _source field, can be overridden on each sub-requestAPI name:
_source_excludesAdds one or more values to
sourceExcludes. -
sourceIncludes
Default list of fields to extract and return from the _source field, can be overridden on each sub-requestAPI name:
_source_includesAdds all elements of
listtosourceIncludes. -
sourceIncludes
Default list of fields to extract and return from the _source field, can be overridden on each sub-requestAPI name:
_source_includesAdds one or more values to
sourceIncludes. -
index
Default index for items which don't provide oneAPI name:
index -
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
Sets require_alias for all incoming documents. Defaults to unset (false)API name:
require_alias -
routing
Specific routing valueAPI name:
routing -
timeout
Explicit operation timeoutAPI name:
timeout -
timeout
Explicit operation timeoutAPI name:
timeout -
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 -
waitForActiveShards
public final BulkRequest.Builder waitForActiveShards(Function<WaitForActiveShards.Builder, ObjectBuilder<WaitForActiveShards>> fn) 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.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.
-