Class SourceManyExtensions
Provides convenience extension methods to get many _source's given a list of ids.
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public static class SourceManyExtensions
Methods
| Edit this page View SourceSourceManyAsync<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 |
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 |
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 |
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 |