Search Results for

    Show / Hide Table of Contents

    Class SourceManyExtensions

    Provides convenience extension methods to get many _source's given a list of ids.

    Inheritance
    object
    SourceManyExtensions
    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 SourceManyExtensions

    Methods

    | Edit this page View Source

    SourceManyAsync<T>(IOpenSearchClient, IEnumerable<long>, string, CancellationToken)

    SourceMany allows you to get a list of T documents out of OpenSearch, internally it calls into MultiGet()

    Multi GET API allows to get multiple documents based on an index, type (optional) and id (and possibly routing). The response includes a docs array with all the fetched documents, each element similar in structure to a document provided by the get API.

     

    https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/
    Declaration
    public static Task<IEnumerable<T>> SourceManyAsync<T>(this IOpenSearchClient client, IEnumerable<long> ids, string index = null, CancellationToken cancellationToken = default) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<long> ids

    A list of ids as int

    string index

    Optionally override the default inferred indexname for T

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

    The type used to infer the default index and typename

    | Edit this page View Source

    SourceManyAsync<T>(IOpenSearchClient, IEnumerable<string>, string, CancellationToken)

    SourceMany allows you to get a list of T documents out of OpenSearch, internally it calls into MultiGet()

    Multi GET API allows to get multiple documents based on an index, type (optional) and id (and possibly routing). The response includes a docs array with all the fetched documents, each element similar in structure to a document provided by the get API.

     

    https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/
    Declaration
    public static Task<IEnumerable<T>> SourceManyAsync<T>(this IOpenSearchClient client, IEnumerable<string> ids, string index = null, CancellationToken cancellationToken = default) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<string> ids

    A list of ids as string

    string index

    Optionally override the default inferred indexname for T

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

    The type used to infer the default index and typename

    | Edit this page View Source

    SourceMany<T>(IOpenSearchClient, IEnumerable<long>, string)

    SourceMany allows you to get a list of T documents out of OpenSearch, internally it calls into MultiGet()

    Multi GET API allows to get multiple documents based on an index, type (optional) and id (and possibly routing). The response includes a docs array with all the fetched documents, each element similar in structure to a document provided by the get API.

     

    https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/
    Declaration
    public static IEnumerable<T> SourceMany<T>(this IOpenSearchClient client, IEnumerable<long> ids, string index = null) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<long> ids

    A list of ids as int

    string index

    Optionally override the default inferred indexname for T

    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    The type used to infer the default index and typename

    | Edit this page View Source

    SourceMany<T>(IOpenSearchClient, IEnumerable<string>, string)

    SourceMany allows you to get a list of T documents out of OpenSearch, internally it calls into MultiGet()

    Multi GET API allows to get multiple documents based on an index, type (optional) and id (and possibly routing). The response includes a docs array with all the fetched documents, each element similar in structure to a document provided by the get API.

     

    https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/multi-get/
    Declaration
    public static IEnumerable<T> SourceMany<T>(this IOpenSearchClient client, IEnumerable<string> ids, string index = null) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<string> ids

    A list of ids as string

    string index

    Optionally override the default inferred indexname for T

    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    The type used to infer the default index and typename

    • Edit this page
    • View Source
    In this article
    • Methods
      • SourceManyAsync<T>(IOpenSearchClient, IEnumerable<long>, string, CancellationToken)
      • SourceManyAsync<T>(IOpenSearchClient, IEnumerable<string>, string, CancellationToken)
      • SourceMany<T>(IOpenSearchClient, IEnumerable<long>, string)
      • SourceMany<T>(IOpenSearchClient, IEnumerable<string>, string)
    Back to top Generated by DocFX