Class DeleteRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.DeleteRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<DeleteRequest>
- Enclosing class:
- DeleteRequest
public static class DeleteRequest.Builder extends java.lang.Object implements ObjectBuilder<DeleteRequest>
Builder for
DeleteRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description DeleteRequest
build()
Builds aDeleteRequest
.DeleteRequest.Builder
id(java.lang.String value)
Required - The document IDDeleteRequest.Builder
ifPrimaryTerm(java.lang.Long value)
only perform the delete operation if the last operation that has changed the document has the specified primary termDeleteRequest.Builder
ifSeqNo(java.lang.Integer value)
only perform the delete operation if the last operation that has changed the document has the specified sequence numberDeleteRequest.Builder
index(java.lang.String value)
Required - The name of the indexDeleteRequest.Builder
refresh(jakarta.json.JsonValue value)
Iftrue
then refresh the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
(the default) then do nothing with refreshes.DeleteRequest.Builder
routing(java.lang.String value)
Specific routing valueDeleteRequest.Builder
timeout(java.lang.String value)
Explicit operation timeoutDeleteRequest.Builder
type(java.lang.String value)
The type of the documentDeleteRequest.Builder
version(java.lang.Long value)
Explicit version number for concurrency controlDeleteRequest.Builder
versionType(VersionType value)
Specific version typeDeleteRequest.Builder
waitForActiveShards(jakarta.json.JsonValue value)
Sets the number of shard copies that must be active before proceeding with the delete operation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Required - The document IDAPI name:
id
-
index
Required - The name of the indexAPI name:
index
-
type
The type of the documentAPI name:
type
-
ifPrimaryTerm
only perform the delete operation if the last operation that has changed the document has the specified primary termAPI name:
if_primary_term
-
ifSeqNo
only perform the delete operation if the last operation that has changed the document has the specified sequence numberAPI name:
if_seq_no
-
refresh
Iftrue
then refresh the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
(the default) then do nothing with refreshes.API name:
refresh
-
routing
Specific routing valueAPI name:
routing
-
timeout
Explicit operation timeoutAPI name:
timeout
-
version
Explicit version number for concurrency controlAPI name:
version
-
versionType
Specific version typeAPI name:
version_type
-
waitForActiveShards
Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set toall
for 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
-
build
Builds aDeleteRequest
.- Specified by:
build
in interfaceObjectBuilder<DeleteRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-