Search Results for

    Show / Hide Table of Contents

    Class GetManyExtensions

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

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

    Methods

    | Edit this page View Source

    GetManyAsync<T>(IOpenSearchClient, IEnumerable<long>, IndexName, CancellationToken)

    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<IMultiGetHit<T>>> GetManyAsync<T>(this IOpenSearchClient client, IEnumerable<long> ids, IndexName index = null, CancellationToken cancellationToken = default) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<long> ids

    IEnumerable of ids as ints for the documents to fetch

    IndexName index

    Optionally override the default inferred index name for T

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

    The type used to infer the default index and typename

    | Edit this page View Source

    GetManyAsync<T>(IOpenSearchClient, IEnumerable<string>, IndexName, CancellationToken)

    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<IMultiGetHit<T>>> GetManyAsync<T>(this IOpenSearchClient client, IEnumerable<string> ids, IndexName index = null, CancellationToken cancellationToken = default) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<string> ids

    IEnumerable of ids as string for the documents to fetch

    IndexName index

    Optionally override the default inferred index name for T

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

    The type used to infer the default index and typename

    | Edit this page View Source

    GetMany<T>(IOpenSearchClient, IEnumerable<long>, IndexName)

    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<IMultiGetHit<T>> GetMany<T>(this IOpenSearchClient client, IEnumerable<long> ids, IndexName index = null) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<long> ids

    IEnumerable of ids as ints for the documents to fetch

    IndexName index

    Optionally override the default inferred index name for T

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

    The type used to infer the default index and typename

    | Edit this page View Source

    GetMany<T>(IOpenSearchClient, IEnumerable<string>, IndexName)

    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<IMultiGetHit<T>> GetMany<T>(this IOpenSearchClient client, IEnumerable<string> ids, IndexName index = null) where T : class
    Parameters
    Type Name Description
    IOpenSearchClient client
    IEnumerable<string> ids

    IEnumerable of ids as string for the documents to fetch

    IndexName index

    Optionally override the default inferred index name for T

    Returns
    Type Description
    IEnumerable<IMultiGetHit<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
      • GetManyAsync<T>(IOpenSearchClient, IEnumerable<long>, IndexName, CancellationToken)
      • GetManyAsync<T>(IOpenSearchClient, IEnumerable<string>, IndexName, CancellationToken)
      • GetMany<T>(IOpenSearchClient, IEnumerable<long>, IndexName)
      • GetMany<T>(IOpenSearchClient, IEnumerable<string>, IndexName)
    Back to top Generated by DocFX