Search Results for

    Show / Hide Table of Contents

    Class BulkUpdateOperation<TDocument, TPartialDocument>

    Inheritance
    object
    BulkOperationBase
    BulkUpdateOperation<TDocument, TPartialDocument>
    Implements
    IBulkUpdateOperation<TDocument, TPartialDocument>
    IBulkOperation
    Inherited Members
    BulkOperationBase.Id
    BulkOperationBase.Index
    BulkOperationBase.RetriesOnConflict
    BulkOperationBase.Routing
    BulkOperationBase.Version
    BulkOperationBase.VersionType
    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
    [DataContract]
    public class BulkUpdateOperation<TDocument, TPartialDocument> : BulkOperationBase, IBulkUpdateOperation<TDocument, TPartialDocument>, IBulkOperation where TDocument : class where TPartialDocument : class
    Type Parameters
    Name Description
    TDocument
    TPartialDocument

    Constructors

    | Edit this page View Source

    BulkUpdateOperation(Id)

    Declaration
    public BulkUpdateOperation(Id id)
    Parameters
    Type Name Description
    Id id
    | Edit this page View Source

    BulkUpdateOperation(TDocument, bool)

    Create a new bulk operation

    Declaration
    public BulkUpdateOperation(TDocument idFrom, bool useIdFromAsUpsert = false)
    Parameters
    Type Name Description
    TDocument idFrom

    Use this document to infer the id from

    bool useIdFromAsUpsert

    Use the document to infer on as the upsert document in this update operation

    | Edit this page View Source

    BulkUpdateOperation(TDocument, TPartialDocument, bool)

    Create a new Bulk Operation

    Declaration
    public BulkUpdateOperation(TDocument idFrom, TPartialDocument update, bool useIdFromAsUpsert = false)
    Parameters
    Type Name Description
    TDocument idFrom

    Use this document to infer the id from

    TPartialDocument update

    The partial update document (doc) to send as update

    bool useIdFromAsUpsert

    Use the document to infer on as the upsert document in this update operation

    Properties

    | Edit this page View Source

    ClrType

    Declaration
    protected override Type ClrType { get; }
    Property Value
    Type Description
    Type
    Overrides
    BulkOperationBase.ClrType
    | Edit this page View Source

    Doc

    The partial update document to be merged on to the existing object.

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

    DocAsUpsert

    Instead of sending a partial doc with Doc plus an upsert doc with Upsert, setting DocAsUpsert to true will use the contents of doc as the upsert value.

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

    IdFrom

    Infers the id of the object to update from the provided object. See Doc to apply a partial object merge.

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

    IfPrimaryTerm

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

    IfSequenceNumber

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

    Operation

    Declaration
    protected override string Operation { get; }
    Property Value
    Type Description
    string
    Overrides
    BulkOperationBase.Operation
    | Edit this page View Source

    Script

    A script to specify the update.

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

    ScriptedUpsert

    If you would like your script to run regardless of whether the document exists or not — i.e. the script handles initializing the document instead of the upsert element — then set scripted_upsert to true

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

    Source

    True or false to return the _source field or not, or a list of fields to return.

    Declaration
    public Union<bool, ISourceFilter> Source { get; set; }
    Property Value
    Type Description
    Union<bool, ISourceFilter>
    | Edit this page View Source

    Upsert

    A document to upsert when the specified document to be updated is not found

    Declaration
    public TDocument Upsert { get; set; }
    Property Value
    Type Description
    TDocument

    Methods

    | Edit this page View Source

    GetBody()

    Declaration
    protected override object GetBody()
    Returns
    Type Description
    object
    Overrides
    BulkOperationBase.GetBody()
    | Edit this page View Source

    GetIdForOperation(Inferrer)

    Declaration
    protected override Id GetIdForOperation(Inferrer inferrer)
    Parameters
    Type Name Description
    Inferrer inferrer
    Returns
    Type Description
    Id
    Overrides
    BulkOperationBase.GetIdForOperation(Inferrer)
    | Edit this page View Source

    GetRoutingForOperation(Inferrer)

    Declaration
    protected override Routing GetRoutingForOperation(Inferrer inferrer)
    Parameters
    Type Name Description
    Inferrer inferrer
    Returns
    Type Description
    Routing
    Overrides
    BulkOperationBase.GetRoutingForOperation(Inferrer)

    Implements

    IBulkUpdateOperation<TDocument, TPartialDocument>
    IBulkOperation

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • BulkUpdateOperation(Id)
      • BulkUpdateOperation(TDocument, bool)
      • BulkUpdateOperation(TDocument, TPartialDocument, bool)
    • Properties
      • ClrType
      • Doc
      • DocAsUpsert
      • IdFrom
      • IfPrimaryTerm
      • IfSequenceNumber
      • Operation
      • Script
      • ScriptedUpsert
      • Source
      • Upsert
    • Methods
      • GetBody()
      • GetIdForOperation(Inferrer)
      • GetRoutingForOperation(Inferrer)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX