Class BulkStreamDescriptor
Descriptor for BulkStream
<p>https://docs.opensearch.org/latest/api-reference/document-apis/bulk-streaming/</p>
Inheritance
BulkStreamDescriptor
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class BulkStreamDescriptor : RequestDescriptorBase<BulkStreamDescriptor, BulkStreamRequestParameters, IBulkStreamRequest>, IDescriptor, IBulkStreamRequest, IRequest<BulkStreamRequestParameters>, IRequest
Constructors
|
Edit this page
View Source
BulkStreamDescriptor()
Declaration
public BulkStreamDescriptor()
|
Edit this page
View Source
BulkStreamDescriptor(IndexName)
Declaration
public BulkStreamDescriptor(IndexName index)
Parameters
| Type |
Name |
Description |
| IndexName |
index |
Optional, accepts null
|
Methods
|
Edit this page
View Source
AddOperation(IBulkOperation)
Declaration
public BulkStreamDescriptor AddOperation(IBulkOperation operation)
Parameters
Returns
|
Edit this page
View Source
BatchInterval(Time)
Specifies for how long bulk operations should be accumulated into a batch before sending the batch to data nodes.
Declaration
public BulkStreamDescriptor BatchInterval(Time batchinterval)
Parameters
| Type |
Name |
Description |
| Time |
batchinterval |
|
Returns
|
Edit this page
View Source
BatchSize(long?)
Specifies how many bulk operations should be accumulated into a batch before sending the batch to data nodes.
Declaration
public BulkStreamDescriptor BatchSize(long? batchsize)
Parameters
| Type |
Name |
Description |
| long? |
batchsize |
|
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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Index<T>(Func<BulkIndexDescriptor<T>, IBulkIndexOperation<T>>)
Declaration
public BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor Refresh(Refresh? refresh)
Parameters
| Type |
Name |
Description |
| Refresh? |
refresh |
|
Returns
|
Edit this page
View Source
RequestDefaults(BulkStreamRequestParameters)
Allows a request implementation to set certain request parameter defaults, use sparingly!
Declaration
protected override sealed void RequestDefaults(BulkStreamRequestParameters parameters)
Parameters
Overrides
|
Edit this page
View Source
RequireAlias(bool?)
If true, the request's actions must target an index alias.
Declaration
public BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor 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 BulkStreamDescriptor WaitForActiveShards(string waitforactiveshards)
Parameters
| Type |
Name |
Description |
| string |
waitforactiveshards |
|
Returns
Implements
Extension Methods