Class IndexManyExtensions
Provides GetMany extensions that make it easier to get many documents given a list of ids
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public static class IndexManyExtensions
Methods
| Edit this page View SourceIndexManyAsync<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 |
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 |