Class DeleteRequest.Builder
- All Implemented Interfaces:
WithJson<DeleteRequest.Builder>
,ObjectBuilder<DeleteRequest>
- Enclosing class:
- DeleteRequest
DeleteRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aDeleteRequest
.final DeleteRequest.Builder
Required - A unique identifier for the document.final DeleteRequest.Builder
ifPrimaryTerm
(Long value) Only perform the operation if the document has this primary term.final DeleteRequest.Builder
Only perform the operation if the document has this sequence number.final DeleteRequest.Builder
Required - The name of the target index.final DeleteRequest.Builder
Iftrue
, Elasticsearch refreshes the affected shards to make this operation visible to search.final DeleteRequest.Builder
A custom value used to route operations to a specific shard.protected DeleteRequest.Builder
self()
final DeleteRequest.Builder
The period to wait for active shards.final DeleteRequest.Builder
The period to wait for active shards.final DeleteRequest.Builder
An explicit version number for concurrency control.final DeleteRequest.Builder
versionType
(VersionType value) The version type.final DeleteRequest.Builder
The minimum number of shard copies that must be active before proceeding with the operation.final DeleteRequest.Builder
The minimum number of shard copies that must be active before proceeding with the operation.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Required - A unique identifier for the document.API name:
id
-
ifPrimaryTerm
Only perform the operation if the document has this primary term.API name:
if_primary_term
-
ifSeqNo
Only perform the operation if the document has this sequence number.API name:
if_seq_no
-
index
Required - The name of the target index.API name:
index
-
refresh
Iftrue
, Elasticsearch refreshes the affected shards to make this operation visible to search. Ifwait_for
, it waits for a refresh to make this operation visible to search. Iffalse
, it does nothing with refreshes.API name:
refresh
-
routing
A custom value used to route operations to a specific shard.API name:
routing
-
timeout
The period to wait for active shards.This parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs. Some reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation. By default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error.
API name:
timeout
-
timeout
The period to wait for active shards.This parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs. Some reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation. By default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error.
API name:
timeout
-
version
An explicit version number for concurrency control. It must match the current version of the document for the request to succeed.API name:
version
-
versionType
The version type.API name:
version_type
-
waitForActiveShards
The minimum number of shard copies that must be active before proceeding with the operation. You can set it toall
or any positive integer up to the total number of shards in the index (number_of_replicas+1
). The default value of1
means it waits for each primary shard to be active.API name:
wait_for_active_shards
-
waitForActiveShards
public final DeleteRequest.Builder waitForActiveShards(Function<WaitForActiveShards.Builder, ObjectBuilder<WaitForActiveShards>> fn) The minimum number of shard copies that must be active before proceeding with the operation. You can set it toall
or any positive integer up to the total number of shards in the index (number_of_replicas+1
). The default value of1
means it waits for each primary shard to be active.API name:
wait_for_active_shards
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<DeleteRequest.Builder>
-
build
Builds aDeleteRequest
.- Specified by:
build
in interfaceObjectBuilder<DeleteRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-