Class BulkDescriptor
Descriptor for Bulk
https://opensearch.org/docs/latest/api-reference/document-apis/bulk/
Inheritance
BulkDescriptor
Assembly: OpenSearch.Client.dll
Syntax
public class BulkDescriptor : RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>, IDescriptor, IBulkRequest, IRequest<BulkRequestParameters>, IRequest
Constructors
|
Edit this page
View Source
BulkDescriptor()
Declaration
|
Edit this page
View Source
BulkDescriptor(IndexName)
Declaration
public BulkDescriptor(IndexName index)
Parameters
Type |
Name |
Description |
IndexName |
index |
Optional, accepts null
|
Methods
|
Edit this page
View Source
AddOperation(IBulkOperation)
Declaration
public BulkDescriptor AddOperation(IBulkOperation operation)
Parameters
Returns
|
Edit this page
View Source
CreateMany<T>(IEnumerable<T>, Func<BulkCreateDescriptor<T>, T, IBulkCreateOperation<T>>)
CreateMany, convenience method to create many documents at once.
Declaration
public BulkDescriptor CreateMany<T>(IEnumerable<T> objects, Func<BulkCreateDescriptor<T>, T, IBulkCreateOperation<T>> bulkCreateSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Create<T>(Func<BulkCreateDescriptor<T>, IBulkCreateOperation<T>>)
Declaration
public BulkDescriptor Create<T>(Func<BulkCreateDescriptor<T>, IBulkCreateOperation<T>> bulkCreateSelector) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
DeleteMany<T>(IEnumerable<long>, Func<BulkDeleteDescriptor<T>, long, IBulkDeleteOperation<T>>)
DeleteMany, convenience method to delete many objects at once.
Declaration
public BulkDescriptor DeleteMany<T>(IEnumerable<long> ids, Func<BulkDeleteDescriptor<T>, long, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
DeleteMany<T>(IEnumerable<string>, Func<BulkDeleteDescriptor<T>, string, IBulkDeleteOperation<T>>)
DeleteMany, convenience method to delete many objects at once.
Declaration
public BulkDescriptor DeleteMany<T>(IEnumerable<string> ids, Func<BulkDeleteDescriptor<T>, string, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
DeleteMany<T>(IEnumerable<T>, Func<BulkDeleteDescriptor<T>, T, IBulkDeleteOperation<T>>)
DeleteMany, convenience method to delete many objects at once.
Declaration
public BulkDescriptor DeleteMany<T>(IEnumerable<T> objects, Func<BulkDeleteDescriptor<T>, T, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Delete<T>(Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>>)
Declaration
public BulkDescriptor Delete<T>(Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>> bulkDeleteSelector) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Delete<T>(T, Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>>)
Declaration
public BulkDescriptor Delete<T>(T obj, Func<BulkDeleteDescriptor<T>, IBulkDeleteOperation<T>> bulkDeleteSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Index(IndexName)
Name of the data stream, index, or index alias to perform bulk actions on.
Declaration
public BulkDescriptor Index(IndexName index)
Parameters
Returns
|
Edit this page
View Source
IndexMany<T>(IEnumerable<T>, Func<BulkIndexDescriptor<T>, T, IBulkIndexOperation<T>>)
IndexMany, convenience method to pass many objects at once.
Declaration
public BulkDescriptor IndexMany<T>(IEnumerable<T> objects, Func<BulkIndexDescriptor<T>, T, IBulkIndexOperation<T>> bulkIndexSelector = null) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public BulkDescriptor Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Index<T>(Func<BulkIndexDescriptor<T>, IBulkIndexOperation<T>>)
Declaration
public BulkDescriptor Index<T>(Func<BulkIndexDescriptor<T>, IBulkIndexOperation<T>> bulkIndexSelector) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Pipeline(string)
ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to _none
disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
Declaration
public BulkDescriptor Pipeline(string pipeline)
Parameters
Type |
Name |
Description |
string |
pipeline |
|
Returns
|
Edit this page
View Source
Refresh(Refresh?)
If true
, OpenSearch refreshes the affected shards to make this operation visible to search, if wait_for
then wait for a refresh to make this operation visible to search, if false
do nothing with refreshes. Valid values: true
, false
, wait_for
.
Declaration
public BulkDescriptor Refresh(Refresh? refresh)
Parameters
Type |
Name |
Description |
Refresh? |
refresh |
|
Returns
|
Edit this page
View Source
RequireAlias(bool?)
If true
, the request's actions must target an index alias.
Declaration
public BulkDescriptor RequireAlias(bool? requirealias = true)
Parameters
Type |
Name |
Description |
bool? |
requirealias |
|
Returns
|
Edit this page
View Source
Routing(Routing)
A document is routed to a particular shard in an index using the following formula
shard_num = hash(_routing) % num_primary_shards
OpenSearch will use the document id if not provided.
For requests that are constructed from/for a document OpenSearch.Client will automatically infer the routing key
if that document has a JoinField or a routing mapping on for its type exists on ConnectionSettings
Declaration
public BulkDescriptor Routing(Routing routing)
Parameters
Type |
Name |
Description |
Routing |
routing |
|
Returns
|
Edit this page
View Source
SourceEnabled(bool?)
Whether the _source should be included in the response.
Declaration
public BulkDescriptor SourceEnabled(bool? sourceenabled = true)
Parameters
Type |
Name |
Description |
bool? |
sourceenabled |
|
Returns
|
Edit this page
View Source
SourceExcludes(Fields)
A comma-separated list of source fields to exclude from the response.
Declaration
public BulkDescriptor SourceExcludes(Fields sourceexcludes)
Parameters
Type |
Name |
Description |
Fields |
sourceexcludes |
|
Returns
|
Edit this page
View Source
SourceExcludes<T>(params Expression<Func<T, object>>[])
A comma-separated list of source fields to exclude from the response.
Declaration
public BulkDescriptor SourceExcludes<T>(params Expression<Func<T, object>>[] fields) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
SourceIncludes(Fields)
A comma-separated list of source fields to include in the response.
Declaration
public BulkDescriptor SourceIncludes(Fields sourceincludes)
Parameters
Type |
Name |
Description |
Fields |
sourceincludes |
|
Returns
|
Edit this page
View Source
SourceIncludes<T>(params Expression<Func<T, object>>[])
A comma-separated list of source fields to include in the response.
Declaration
public BulkDescriptor SourceIncludes<T>(params Expression<Func<T, object>>[] fields) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Timeout(Time)
Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
Declaration
public BulkDescriptor Timeout(Time timeout)
Parameters
Type |
Name |
Description |
Time |
timeout |
|
Returns
|
Edit this page
View Source
Type(string)
Default document type for items which don't provide one.
Declaration
public BulkDescriptor Type(string type)
Parameters
Type |
Name |
Description |
string |
type |
|
Returns
|
Edit this page
View Source
UpdateMany<T>(IEnumerable<T>, Func<BulkUpdateDescriptor<T, T>, T, IBulkUpdateOperation<T, T>>)
UpdateMany, convenience method to pass many objects at once to do multiple updates.
Declaration
public BulkDescriptor UpdateMany<T>(IEnumerable<T> objects, Func<BulkUpdateDescriptor<T, T>, T, IBulkUpdateOperation<T, T>> bulkUpdateSelector) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
UpdateMany<T, TPartialDocument>(IEnumerable<T>, Func<BulkUpdateDescriptor<T, TPartialDocument>, T, IBulkUpdateOperation<T, TPartialDocument>>)
UpdateMany, convenience method to pass many objects at once to do multiple updates.
Declaration
public BulkDescriptor UpdateMany<T, TPartialDocument>(IEnumerable<T> objects, Func<BulkUpdateDescriptor<T, TPartialDocument>, T, IBulkUpdateOperation<T, TPartialDocument>> bulkUpdateSelector) where T : class where TPartialDocument : class
Parameters
Returns
Type Parameters
Name |
Description |
T |
|
TPartialDocument |
|
|
Edit this page
View Source
Update<T>(Func<BulkUpdateDescriptor<T, T>, IBulkUpdateOperation<T, T>>)
Declaration
public BulkDescriptor Update<T>(Func<BulkUpdateDescriptor<T, T>, IBulkUpdateOperation<T, T>> bulkUpdateSelector) where T : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Update<T, TPartialDocument>(Func<BulkUpdateDescriptor<T, TPartialDocument>, IBulkUpdateOperation<T, TPartialDocument>>)
Declaration
public BulkDescriptor Update<T, TPartialDocument>(Func<BulkUpdateDescriptor<T, TPartialDocument>, IBulkUpdateOperation<T, TPartialDocument>> bulkUpdateSelector) where T : class where TPartialDocument : class
Parameters
Returns
Type Parameters
Name |
Description |
T |
|
TPartialDocument |
|
|
Edit this page
View Source
WaitForActiveShards(string)
The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1
).
Declaration
public BulkDescriptor WaitForActiveShards(string waitforactiveshards)
Parameters
Type |
Name |
Description |
string |
waitforactiveshards |
|
Returns
Implements
Extension Methods