Search Results for

    Show / Hide Table of Contents

    Class DeleteRequest

    Request for Delete

    https://opensearch.org/docs/latest/api-reference/document-apis/delete-document/

    Inheritance
    object
    RequestBase<DeleteRequestParameters>
    PlainRequestBase<DeleteRequestParameters>
    DeleteRequest
    DeleteRequest<TDocument>
    Implements
    IDeleteRequest
    IRequest<DeleteRequestParameters>
    IRequest
    Inherited Members
    PlainRequestBase<DeleteRequestParameters>.RequestConfiguration
    PlainRequestBase<DeleteRequestParameters>.ErrorTrace
    PlainRequestBase<DeleteRequestParameters>.FilterPath
    PlainRequestBase<DeleteRequestParameters>.Human
    PlainRequestBase<DeleteRequestParameters>.Pretty
    PlainRequestBase<DeleteRequestParameters>.SourceQueryString
    RequestBase<DeleteRequestParameters>.HttpMethod
    RequestBase<DeleteRequestParameters>.RequestState
    RequestBase<DeleteRequestParameters>.ContentType
    RequestBase<DeleteRequestParameters>.ResolveUrl(RouteValues, IConnectionSettingsValues)
    RequestBase<DeleteRequestParameters>.RequestDefaults(DeleteRequestParameters)
    RequestBase<DeleteRequestParameters>.Q<TOut>(string)
    RequestBase<DeleteRequestParameters>.Q(string, object)
    RequestBase<DeleteRequestParameters>.SetAcceptHeader(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public class DeleteRequest : PlainRequestBase<DeleteRequestParameters>, IDeleteRequest, IRequest<DeleteRequestParameters>, IRequest

    Constructors

    | Edit this page View Source

    DeleteRequest()

    Used for serialization purposes, making sure we have a parameterless constructor

    Declaration
    protected DeleteRequest()
    | Edit this page View Source

    DeleteRequest(IndexName, Id)

    /{index}/_doc/{id}

    Declaration
    public DeleteRequest(IndexName index, Id id)
    Parameters
    Type Name Description
    IndexName index

    this parameter is required

    Id id

    this parameter is required

    Properties

    | Edit this page View Source

    IfPrimaryTerm

    Only perform the operation if the document has this primary term.

    Declaration
    public long? IfPrimaryTerm { get; set; }
    Property Value
    Type Description
    long?
    | Edit this page View Source

    IfSequenceNumber

    Only perform the operation if the document has this sequence number.

    Declaration
    public long? IfSequenceNumber { get; set; }
    Property Value
    Type Description
    long?
    | Edit this page View Source

    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.

    Declaration
    public Refresh? Refresh { get; set; }
    Property Value
    Type Description
    Refresh?
    | Edit this page View Source

    Routing

    A document is routed to a particular shard in an index using the following formula

    shard_num = hash(_routing) % num_primary_shards

    OpenSearch will use the document id if not provided.

    For requests that are constructed from/for a document OpenSearch.Client will automatically infer the routing key if that document has a JoinField or a routing mapping on for its type exists on ConnectionSettings

    Declaration
    public Routing Routing { get; set; }
    Property Value
    Type Description
    Routing
    | Edit this page View Source

    Self

    Declaration
    protected IDeleteRequest Self { get; }
    Property Value
    Type Description
    IDeleteRequest
    | Edit this page View Source

    Timeout

    Period to wait for active shards.

    Declaration
    public Time Timeout { get; set; }
    Property Value
    Type Description
    Time
    | Edit this page View Source

    Version

    Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.

    Declaration
    public long? Version { get; set; }
    Property Value
    Type Description
    long?
    | Edit this page View Source

    VersionType

    Specific version type: external, external_gte.

    Declaration
    public VersionType? VersionType { get; set; }
    Property Value
    Type Description
    VersionType?
    | Edit this page View Source

    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).

    Declaration
    public string WaitForActiveShards { get; set; }
    Property Value
    Type Description
    string

    Implements

    IDeleteRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • DeleteRequest()
      • DeleteRequest(IndexName, Id)
    • Properties
      • IfPrimaryTerm
      • IfSequenceNumber
      • Refresh
      • Routing
      • Self
      • Timeout
      • Version
      • VersionType
      • WaitForActiveShards
    • Implements
    • Extension Methods
    Back to top Generated by DocFX