Class DeleteRequest

java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.core.DeleteRequest
All Implemented Interfaces:
ToCopyableBuilder<DeleteRequest.Builder,DeleteRequest>

@Generated("org.opensearch.client.codegen.CodeGenerator") public final class DeleteRequest extends RequestBase implements ToCopyableBuilder<DeleteRequest.Builder,DeleteRequest>
Removes a document from the index.
  • Field Details

  • Method Details

    • of

    • id

      @Nonnull public final String id()
      Required - Unique identifier for the document.

      API name: id

    • ifPrimaryTerm

      @Nullable public final Long ifPrimaryTerm()
      Only perform the operation if the document has this primary term.

      API name: if_primary_term

    • ifSeqNo

      @Nullable public final Long ifSeqNo()
      Only perform the operation if the document has this sequence number.

      API name: if_seq_no

    • index

      @Nonnull public final String index()
      Required - Name of the target index.

      API name: index

    • refresh

      @Nullable public final Refresh refresh()
      If true, OpenSearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. Valid values: true, false, wait_for.

      API name: refresh

    • routing

      @Nonnull public final List<String> routing()
      Custom value used to route operations to a specific shard.

      API name: routing

    • timeout

      @Nullable public final Time timeout()
      Period to wait for active shards.

      API name: timeout

    • version

      @Nullable public final Long version()
      Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.

      API name: version

    • versionType

      @Nullable public final VersionType versionType()
      Specific version type: external, external_gte.

      API name: version_type

    • waitForActiveShards

      @Nullable public final WaitForActiveShards waitForActiveShards()
      The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).

      API name: wait_for_active_shards

    • toBuilder

      @Nonnull public DeleteRequest.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<DeleteRequest.Builder,DeleteRequest>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static DeleteRequest.Builder builder()
    • applyQueryParameters

      protected void applyQueryParameters(@Nonnull Map<String,String> params)
      Overrides:
      applyQueryParameters in class RequestBase
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object