Class DeleteRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.DeleteRequest

public class DeleteRequest
extends RequestBase
Removes a document from the index.
See Also:
API specification
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  DeleteRequest.Builder
    Builder for DeleteRequest.

    Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase

    RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
  • Field Summary

    Fields
    Modifier and Type Field Description
    static Endpoint<DeleteRequest,​DeleteResponse,​ErrorResponse> _ENDPOINT
    Endpoint "delete".
  • Method Summary

    Modifier and Type Method Description
    java.lang.String id()
    Required - The document ID
    java.lang.Long ifPrimaryTerm()
    only perform the delete operation if the last operation that has changed the document has the specified primary term
    java.lang.Long ifSeqNo()
    only perform the delete operation if the last operation that has changed the document has the specified sequence number
    java.lang.String index()
    Required - The name of the index
    static DeleteRequest of​(java.util.function.Function<DeleteRequest.Builder,​ObjectBuilder<DeleteRequest>> fn)  
    Refresh refresh()
    If true then refresh 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 (the default) then do nothing with refreshes.
    java.lang.String routing()
    Specific routing value
    Time timeout()
    Explicit operation timeout
    java.lang.Long version()
    Explicit version number for concurrency control
    VersionType versionType()
    Specific version type
    WaitForActiveShards waitForActiveShards()
    Sets the number of shard copies that must be active before proceeding with the delete operation.

    Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Method Details

    • of

      public static DeleteRequest of​(java.util.function.Function<DeleteRequest.Builder,​ObjectBuilder<DeleteRequest>> fn)
    • id

      public final java.lang.String id()
      Required - The document ID

      API 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 term

      API 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 number

      API name: if_seq_no

    • index

      public final java.lang.String index()
      Required - The name of the index

      API name: index

    • refresh

      @Nullable public final Refresh refresh()
      If true then refresh 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 (the default) then do nothing with refreshes.

      API name: refresh

    • routing

      @Nullable public final java.lang.String routing()
      Specific routing value

      API name: routing

    • timeout

      @Nullable public final Time timeout()
      Explicit operation timeout

      API name: timeout

    • version

      @Nullable public final java.lang.Long version()
      Explicit version number for concurrency control

      API name: version

    • versionType

      @Nullable public final VersionType versionType()
      Specific version type

      API 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 to all 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