Search Results for

    Show / Hide Table of Contents

    Class BulkDescriptor

    Descriptor for Bulk

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

    Inheritance
    object
    RequestBase<BulkRequestParameters>
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>
    BulkDescriptor
    Implements
    IDescriptor
    IBulkRequest
    IRequest<BulkRequestParameters>
    IRequest
    Inherited Members
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.Self
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.Assign<TValue>(TValue, Action<IBulkRequest, TValue>)
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.Qs(string, object)
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.RequestConfiguration(Func<RequestConfigurationDescriptor, IRequestConfiguration>)
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.ErrorTrace(bool?)
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.FilterPath(params string[])
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.FilterPath(IEnumerable<string>)
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.Human(bool?)
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.Pretty(bool?)
    RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>.SourceQueryString(string)
    RequestBase<BulkRequestParameters>.HttpMethod
    RequestBase<BulkRequestParameters>.RequestState
    RequestBase<BulkRequestParameters>.ContentType
    RequestBase<BulkRequestParameters>.ResolveUrl(RouteValues, IConnectionSettingsValues)
    RequestBase<BulkRequestParameters>.RequestDefaults(BulkRequestParameters)
    RequestBase<BulkRequestParameters>.Q<TOut>(string)
    RequestBase<BulkRequestParameters>.Q(string, object)
    RequestBase<BulkRequestParameters>.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 BulkDescriptor : RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>, IDescriptor, IBulkRequest, IRequest<BulkRequestParameters>, IRequest

    Constructors

    | Edit this page View Source

    BulkDescriptor()

    /_bulk

    Declaration
    public BulkDescriptor()
    | Edit this page View Source

    BulkDescriptor(IndexName)

    /{index}/_bulk

    Declaration
    public BulkDescriptor(IndexName index)
    Parameters
    Type Name Description
    IndexName index

    Optional, accepts null

    Methods

    | Edit this page View Source

    AddOperation(IBulkOperation)

    Declaration
    public BulkDescriptor AddOperation(IBulkOperation operation)
    Parameters
    Type Name Description
    IBulkOperation operation
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    CreateMany<T>(IEnumerable<T>, Func<BulkCreateDescriptor<T>, T, IBulkCreateOperation<T>>)

    CreateMany, convenience method to create many documents at once.

    Declaration
    public BulkDescriptor CreateMany<T>(IEnumerable<T> objects, Func<BulkCreateDescriptor<T>, T, IBulkCreateOperation<T>> bulkCreateSelector = null) where T : class
    Parameters
    Type Name Description
    IEnumerable<T> objects

    the objects to create

    Func<BulkCreateDescriptor<T>, T, IBulkCreateOperation<T>> bulkCreateSelector

    A func called on each object to describe the individual create operation

    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Create<T>(Func<BulkCreateDescriptor<T>, IBulkCreateOperation<T>>)

    Declaration
    public BulkDescriptor Create<T>(Func<BulkCreateDescriptor<T>, IBulkCreateOperation<T>> bulkCreateSelector) where T : class
    Parameters
    Type Name Description
    Func<BulkCreateDescriptor<T>, IBulkCreateOperation<T>> bulkCreateSelector
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    DeleteMany<T>(IEnumerable<long>, Func<BulkDeleteDescriptor<T>, long, IBulkDeleteOperation<T>>)

    DeleteMany, convenience method to delete many objects at once.

    Declaration
    public BulkDescriptor DeleteMany<T>(IEnumerable<long> ids, Func<BulkDeleteDescriptor<T>, long, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
    Parameters
    Type Name Description
    IEnumerable<long> ids

    Enumerable of int ids to delete

    Func<BulkDeleteDescriptor<T>, long, IBulkDeleteOperation<T>> bulkDeleteSelector

    A func called on each ids to describe the individual delete operation

    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    DeleteMany<T>(IEnumerable<string>, Func<BulkDeleteDescriptor<T>, string, IBulkDeleteOperation<T>>)

    DeleteMany, convenience method to delete many objects at once.

    Declaration
    public BulkDescriptor DeleteMany<T>(IEnumerable<string> ids, Func<BulkDeleteDescriptor<T>, string, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
    Parameters
    Type Name Description
    IEnumerable<string> ids

    Enumerable of string ids to delete

    Func<BulkDeleteDescriptor<T>, string, IBulkDeleteOperation<T>> bulkDeleteSelector

    A func called on each ids to describe the individual delete operation

    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    DeleteMany<T>(IEnumerable<T>, Func<BulkDeleteDescriptor<T>, T, IBulkDeleteOperation<T>>)

    DeleteMany, convenience method to delete many objects at once.

    Declaration
    public BulkDescriptor DeleteMany<T>(IEnumerable<T> objects, Func<BulkDeleteDescriptor<T>, T, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
    Parameters
    Type Name Description
    IEnumerable<T> objects

    the objects to delete

    Func<BulkDeleteDescriptor<T>, T, IBulkDeleteOperation<T>> bulkDeleteSelector

    A func called on each object to describe the individual delete operation

    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Delete<T>(Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>>)

    Declaration
    public BulkDescriptor Delete<T>(Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>> bulkDeleteSelector) where T : class
    Parameters
    Type Name Description
    Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>> bulkDeleteSelector
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Delete<T>(T, Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>>)

    Declaration
    public BulkDescriptor Delete<T>(T obj, Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
    Parameters
    Type Name Description
    T obj
    Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>> bulkDeleteSelector
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Index(IndexName)

    Name of the data stream, index, or index alias to perform bulk actions on.

    Declaration
    public BulkDescriptor Index(IndexName index)
    Parameters
    Type Name Description
    IndexName index
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    IndexMany<T>(IEnumerable<T>, Func<BulkIndexDescriptor<T>, T, IBulkIndexOperation<T>>)

    IndexMany, convenience method to pass many objects at once.

    Declaration
    public BulkDescriptor IndexMany<T>(IEnumerable<T> objects, Func<BulkIndexDescriptor<T>, T, IBulkIndexOperation<T>> bulkIndexSelector = null) where T : class
    Parameters
    Type Name Description
    IEnumerable<T> objects

    the objects to index

    Func<BulkIndexDescriptor<T>, T, IBulkIndexOperation<T>> bulkIndexSelector

    A func called on each object to describe the individual index operation

    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Index<TOther>()

    a shortcut into calling Index(typeof(TOther))

    Declaration
    public BulkDescriptor Index<TOther>() where TOther : class
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    TOther
    | Edit this page View Source

    Index<T>(Func<BulkIndexDescriptor<T>, IBulkIndexOperation<T>>)

    Declaration
    public BulkDescriptor Index<T>(Func<BulkIndexDescriptor<T>, IBulkIndexOperation<T>> bulkIndexSelector) where T : class
    Parameters
    Type Name Description
    Func<BulkIndexDescriptor<T>, IBulkIndexOperation<T>> bulkIndexSelector
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Pipeline(string)

    ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to _none disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.

    Declaration
    public BulkDescriptor Pipeline(string pipeline)
    Parameters
    Type Name Description
    string pipeline
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    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.

    Declaration
    public BulkDescriptor Refresh(Refresh? refresh)
    Parameters
    Type Name Description
    Refresh? refresh
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    RequireAlias(bool?)

    If true, the request's actions must target an index alias.

    Declaration
    public BulkDescriptor RequireAlias(bool? requirealias = true)
    Parameters
    Type Name Description
    bool? requirealias
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    Routing(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 BulkDescriptor Routing(Routing routing)
    Parameters
    Type Name Description
    Routing routing
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    SourceEnabled(bool?)

    Whether the _source should be included in the response.

    Declaration
    public BulkDescriptor SourceEnabled(bool? sourceenabled = true)
    Parameters
    Type Name Description
    bool? sourceenabled
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    SourceExcludes(Fields)

    A comma-separated list of source fields to exclude from the response.

    Declaration
    public BulkDescriptor SourceExcludes(Fields sourceexcludes)
    Parameters
    Type Name Description
    Fields sourceexcludes
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    SourceExcludes<T>(params Expression<Func<T, object>>[])

    A comma-separated list of source fields to exclude from the response.

    Declaration
    public BulkDescriptor SourceExcludes<T>(params Expression<Func<T, object>>[] fields) where T : class
    Parameters
    Type Name Description
    Expression<Func<T, object>>[] fields
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    SourceIncludes(Fields)

    A comma-separated list of source fields to include in the response.

    Declaration
    public BulkDescriptor SourceIncludes(Fields sourceincludes)
    Parameters
    Type Name Description
    Fields sourceincludes
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    SourceIncludes<T>(params Expression<Func<T, object>>[])

    A comma-separated list of source fields to include in the response.

    Declaration
    public BulkDescriptor SourceIncludes<T>(params Expression<Func<T, object>>[] fields) where T : class
    Parameters
    Type Name Description
    Expression<Func<T, object>>[] fields
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Timeout(Time)

    Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.

    Declaration
    public BulkDescriptor Timeout(Time timeout)
    Parameters
    Type Name Description
    Time timeout
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    Type(string)

    Default document type for items which don't provide one.

    Declaration
    public BulkDescriptor Type(string type)
    Parameters
    Type Name Description
    string type
    Returns
    Type Description
    BulkDescriptor
    | Edit this page View Source

    UpdateMany<T>(IEnumerable<T>, Func<BulkUpdateDescriptor<T, T>, T, IBulkUpdateOperation<T, T>>)

    UpdateMany, convenience method to pass many objects at once to do multiple updates.

    Declaration
    public BulkDescriptor UpdateMany<T>(IEnumerable<T> objects, Func<BulkUpdateDescriptor<T, T>, T, IBulkUpdateOperation<T, T>> bulkUpdateSelector) where T : class
    Parameters
    Type Name Description
    IEnumerable<T> objects

    the objects to update

    Func<BulkUpdateDescriptor<T, T>, T, IBulkUpdateOperation<T, T>> bulkUpdateSelector

    An func called on each object to describe the individual update operation

    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    UpdateMany<T, TPartialDocument>(IEnumerable<T>, Func<BulkUpdateDescriptor<T, TPartialDocument>, T, IBulkUpdateOperation<T, TPartialDocument>>)

    UpdateMany, convenience method to pass many objects at once to do multiple updates.

    Declaration
    public BulkDescriptor UpdateMany<T, TPartialDocument>(IEnumerable<T> objects, Func<BulkUpdateDescriptor<T, TPartialDocument>, T, IBulkUpdateOperation<T, TPartialDocument>> bulkUpdateSelector) where T : class where TPartialDocument : class
    Parameters
    Type Name Description
    IEnumerable<T> objects

    the objects to update

    Func<BulkUpdateDescriptor<T, TPartialDocument>, T, IBulkUpdateOperation<T, TPartialDocument>> bulkUpdateSelector

    An func called on each object to describe the individual update operation

    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    TPartialDocument
    | Edit this page View Source

    Update<T>(Func<BulkUpdateDescriptor<T, T>, IBulkUpdateOperation<T, T>>)

    Declaration
    public BulkDescriptor Update<T>(Func<BulkUpdateDescriptor<T, T>, IBulkUpdateOperation<T, T>> bulkUpdateSelector) where T : class
    Parameters
    Type Name Description
    Func<BulkUpdateDescriptor<T, T>, IBulkUpdateOperation<T, T>> bulkUpdateSelector
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Update<T, TPartialDocument>(Func<BulkUpdateDescriptor<T, TPartialDocument>, IBulkUpdateOperation<T, TPartialDocument>>)

    Declaration
    public BulkDescriptor Update<T, TPartialDocument>(Func<BulkUpdateDescriptor<T, TPartialDocument>, IBulkUpdateOperation<T, TPartialDocument>> bulkUpdateSelector) where T : class where TPartialDocument : class
    Parameters
    Type Name Description
    Func<BulkUpdateDescriptor<T, TPartialDocument>, IBulkUpdateOperation<T, TPartialDocument>> bulkUpdateSelector
    Returns
    Type Description
    BulkDescriptor
    Type Parameters
    Name Description
    T
    TPartialDocument
    | Edit this page View Source

    WaitForActiveShards(string)

    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 BulkDescriptor WaitForActiveShards(string waitforactiveshards)
    Parameters
    Type Name Description
    string waitforactiveshards
    Returns
    Type Description
    BulkDescriptor

    Implements

    IDescriptor
    IBulkRequest
    IRequest<TParameters>
    IRequest

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • BulkDescriptor()
      • BulkDescriptor(IndexName)
    • Methods
      • AddOperation(IBulkOperation)
      • CreateMany<T>(IEnumerable<T>, Func<BulkCreateDescriptor<T>, T, IBulkCreateOperation<T>>)
      • Create<T>(Func<BulkCreateDescriptor<T>, IBulkCreateOperation<T>>)
      • DeleteMany<T>(IEnumerable<long>, Func<BulkDeleteDescriptor<T>, long, IBulkDeleteOperation<T>>)
      • DeleteMany<T>(IEnumerable<string>, Func<BulkDeleteDescriptor<T>, string, IBulkDeleteOperation<T>>)
      • DeleteMany<T>(IEnumerable<T>, Func<BulkDeleteDescriptor<T>, T, IBulkDeleteOperation<T>>)
      • Delete<T>(Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>>)
      • Delete<T>(T, Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>>)
      • Index(IndexName)
      • IndexMany<T>(IEnumerable<T>, Func<BulkIndexDescriptor<T>, T, IBulkIndexOperation<T>>)
      • Index<TOther>()
      • Index<T>(Func<BulkIndexDescriptor<T>, IBulkIndexOperation<T>>)
      • Pipeline(string)
      • Refresh(Refresh?)
      • RequireAlias(bool?)
      • Routing(Routing)
      • SourceEnabled(bool?)
      • SourceExcludes(Fields)
      • SourceExcludes<T>(params Expression<Func<T, object>>[])
      • SourceIncludes(Fields)
      • SourceIncludes<T>(params Expression<Func<T, object>>[])
      • Timeout(Time)
      • Type(string)
      • UpdateMany<T>(IEnumerable<T>, Func<BulkUpdateDescriptor<T, T>, T, IBulkUpdateOperation<T, T>>)
      • UpdateMany<T, TPartialDocument>(IEnumerable<T>, Func<BulkUpdateDescriptor<T, TPartialDocument>, T, IBulkUpdateOperation<T, TPartialDocument>>)
      • Update<T>(Func<BulkUpdateDescriptor<T, T>, IBulkUpdateOperation<T, T>>)
      • Update<T, TPartialDocument>(Func<BulkUpdateDescriptor<T, TPartialDocument>, IBulkUpdateOperation<T, TPartialDocument>>)
      • WaitForActiveShards(string)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX