Class DeleteRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.core.DeleteRequest
-
public class DeleteRequest extends RequestBase
Removes a document from the index.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeleteRequest.BuilderBuilder forDeleteRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
-
Field Summary
Fields Modifier and Type Field Description static Endpoint<DeleteRequest,DeleteResponse,ErrorResponse>_ENDPOINTEndpoint "delete".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringid()Required - The document IDjava.lang.LongifPrimaryTerm()only perform the delete operation if the last operation that has changed the document has the specified primary termjava.lang.LongifSeqNo()only perform the delete operation if the last operation that has changed the document has the specified sequence numberjava.lang.Stringindex()Required - The name of the indexstatic DeleteRequestof(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn)Refreshrefresh()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.java.lang.Stringrouting()Specific routing valueTimetimeout()Explicit operation timeoutjava.lang.Longversion()Explicit version number for concurrency controlVersionTypeversionType()Specific version typeWaitForActiveShardswaitForActiveShards()Sets the number of shard copies that must be active before proceeding with the delete operation.
-
-
-
Field Detail
-
_ENDPOINT
public static final Endpoint<DeleteRequest,DeleteResponse,ErrorResponse> _ENDPOINT
Endpoint "delete".
-
-
Method Detail
-
of
public static DeleteRequest of(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn)
-
id
public final java.lang.String id()
Required - The document IDAPI name:
id
-
ifPrimaryTerm
@Nullable public final java.lang.Long 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
@Nullable public final java.lang.Long ifSeqNo()
only perform the delete operation if the last operation that has changed the document has the specified sequence numberAPI name:
if_seq_no
-
index
public final java.lang.String index()
Required - The name of the indexAPI name:
index
-
refresh
@Nullable public final Refresh 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
-
routing
@Nullable public final java.lang.String routing()
Specific routing valueAPI name:
routing
-
timeout
@Nullable public final Time timeout()
Explicit operation timeoutAPI name:
timeout
-
version
@Nullable public final java.lang.Long version()
Explicit version number for concurrency controlAPI name:
version
-
versionType
@Nullable public final VersionType versionType()
Specific version typeAPI name:
version_type
-
waitForActiveShards
@Nullable public final WaitForActiveShards 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 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
-
-