Search Results for

    Show / Hide Table of Contents

    Class IndexManyExtensions

    Provides GetMany extensions that make it easier to get many documents given a list of ids

    Inheritance
    object
    IndexManyExtensions
    Inherited Members
    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 static class IndexManyExtensions

    Methods

    | Edit this page View Source

    IndexManyAsync<T>(IOpenSearchClient, IEnumerable<T>, IndexName, CancellationToken)

    Shortcut into the Bulk call that indexes the specified objects

     

    https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/
    Declaration
    public static Task<BulkResponse> IndexManyAsync<T>(this IOpenSearchClient client, IEnumerable<T> objects, IndexName index = null, CancellationToken cancellationToken = default) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<T> objects

    List of objects to index, Id will be inferred (Id property or IdProperty attribute on type)

    IndexName index

    Override the inferred indexname for T

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<BulkResponse>
    Type Parameters
    Name Description
    T

    The type used to infer the default index and typename

    | Edit this page View Source

    IndexMany<T>(IOpenSearchClient, IEnumerable<T>, IndexName)

    Shortcut into the Bulk call that indexes the specified objects

     

    https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/
    Declaration
    public static BulkResponse IndexMany<T>(this IOpenSearchClient client, IEnumerable<T> objects, IndexName index = null) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<T> objects

    List of objects to index, Id will be inferred (Id property or IdProperty attribute on type)

    IndexName index

    Override the inferred indexname for T

    Returns
    Type Description
    BulkResponse
    Type Parameters
    Name Description
    T

    The type used to infer the default index and typename

    • Edit this page
    • View Source
    In this article
    • Methods
      • IndexManyAsync<T>(IOpenSearchClient, IEnumerable<T>, IndexName, CancellationToken)
      • IndexMany<T>(IOpenSearchClient, IEnumerable<T>, IndexName)
    Back to top Generated by DocFX