Class BulkRequest.Builder
- All Implemented Interfaces:
- WithJson<BulkRequest.Builder>,- ObjectBuilder<BulkRequest>
- Enclosing class:
- BulkRequest
BulkRequest.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds aBulkRequest.final BulkRequest.BuilderincludeSourceOnError(Boolean value) True or false if to include the document source in the error message in case of parsing errors.final BulkRequest.BuilderThe name of the data stream, index, or index alias to perform bulk actions on.final BulkRequest.BuilderlistExecutedPipelines(Boolean value) Iftrue, the response will include the ingest pipelines that were run for each index or create.final BulkRequest.Builderoperations(BulkOperation value, BulkOperation... values) Required - Request body.final BulkRequest.Builderoperations(BulkOperationVariant value, BulkOperationVariant... values) Required - Request body.final BulkRequest.BuilderRequired - Request body.final BulkRequest.Builderoperations(List<BulkOperation> list) Required - Request body.final BulkRequest.BuilderThe pipeline identifier to use to preprocess incoming documents.final BulkRequest.BuilderIftrue, Elasticsearch refreshes the affected shards to make this operation visible to search.final BulkRequest.BuilderrequireAlias(Boolean value) Iftrue, the request's actions must target an index alias.final BulkRequest.BuilderrequireDataStream(Boolean value) Iftrue, the request's actions must target a data stream (existing or to be created).final BulkRequest.BuilderA custom value that is used to route operations to a specific shard.protected BulkRequest.Builderself()final BulkRequest.Buildersource(SourceConfigParam value) Indicates whether to return the_sourcefield (trueorfalse) or contains a list of fields to return.final BulkRequest.BuilderIndicates whether to return the_sourcefield (trueorfalse) or contains 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.BuilderThe period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.final BulkRequest.BuilderThe period each action waits for the following operations: automatic index creation, dynamic mapping updates, and 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.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
sourceIndicates whether to return the_sourcefield (trueorfalse) or contains a list of fields to return.API name: _source
- 
sourcepublic final BulkRequest.Builder source(Function<SourceConfigParam.Builder, ObjectBuilder<SourceConfigParam>> fn) Indicates whether to return the_sourcefield (trueorfalse) or contains a list of fields to return.API name: _source
- 
sourceExcludesA comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in_source_includesquery parameter. If the_sourceparameter isfalse, this parameter is ignored.API name: _source_excludesAdds all elements of listtosourceExcludes.
- 
sourceExcludesA comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in_source_includesquery parameter. If the_sourceparameter isfalse, this parameter is ignored.API name: _source_excludesAdds one or more values to sourceExcludes.
- 
sourceIncludesA comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the_source_excludesquery parameter. If the_sourceparameter isfalse, this parameter is ignored.API name: _source_includesAdds all elements of listtosourceIncludes.
- 
sourceIncludesA comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the_source_excludesquery parameter. If the_sourceparameter isfalse, this parameter is ignored.API name: _source_includesAdds one or more values to sourceIncludes.
- 
includeSourceOnErrorTrue or false if to include the document source in the error message in case of parsing errors.API name: include_source_on_error
- 
indexThe name of the data stream, index, or index alias to perform bulk actions on.API name: index
- 
listExecutedPipelinesIftrue, the response will include the ingest pipelines that were run for each index or create.API name: list_executed_pipelines
- 
pipelineThe pipeline identifier to use to preprocess incoming documents. If the index has a default ingest pipeline specified, setting the value to_noneturns off 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
- 
refreshIftrue, Elasticsearch refreshes the affected shards to make this operation visible to search. Ifwait_for, 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
- 
requireAliasIftrue, the request's actions must target an index alias.API name: require_alias
- 
requireDataStreamIftrue, the request's actions must target a data stream (existing or to be created).API name: require_data_stream
- 
routingA custom value that is used to route operations to a specific shard.API name: routing
- 
timeoutThe period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards. The default is1m(one minute), which guarantees Elasticsearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur.API name: timeout
- 
timeoutThe period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards. The default is1m(one minute), which guarantees Elasticsearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur.API name: timeout
- 
waitForActiveShardsThe number of shard copies that must be active before proceeding with the operation. Set toallor any positive integer up to the total number of shards in the index (number_of_replicas+1). The default is1, which waits for each primary shard to be active.API name: wait_for_active_shards
- 
waitForActiveShardspublic 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 toallor any positive integer up to the total number of shards in the index (number_of_replicas+1). The default is1, which waits for each primary shard to be active.API name: wait_for_active_shards
- 
operationsRequired - Request body.Adds all elements of listtooperations.
- 
operationsRequired - Request body.Adds one or more values to operations.
- 
operationspublic final BulkRequest.Builder operations(BulkOperationVariant value, BulkOperationVariant... values) Required - Request body.Adds one or more values to operations.
- 
operationspublic 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 class- RequestBase.AbstractBuilder<BulkRequest.Builder>
 
- 
buildBuilds aBulkRequest.- Specified by:
- buildin interface- ObjectBuilder<BulkRequest>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-