Class BulkDescriptor
Descriptor for Bulk
https://opensearch.org/docs/latest/opensearch/rest-api/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)
Default index for items which don't provide one
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)
The pipeline id to preprocess incoming documents with
Declaration
public BulkDescriptor Pipeline(string pipeline)
Parameters
Type |
Name |
Description |
string |
pipeline |
|
Returns
|
Edit this page
View Source
Refresh(Refresh?)
If true
then refresh 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
(the default) then do nothing with refreshes.
Declaration
public BulkDescriptor Refresh(Refresh? refresh)
Parameters
Type |
Name |
Description |
Refresh? |
refresh |
|
Returns
|
Edit this page
View Source
RequireAlias(bool?)
Sets require_alias for all incoming documents. Defaults to unset (false)
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)
Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
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>>[])
Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
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)
Default list of fields to extract and return from the _source field, can be overridden on each sub-request
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>>[])
Default list of fields to extract and return from the _source field, can be overridden on each sub-request
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)
Explicit operation timeout
Declaration
public BulkDescriptor Timeout(Time timeout)
Parameters
Type |
Name |
Description |
Time |
timeout |
|
Returns
|
Edit this page
View Source
TypeQueryString(string)
Default document type for items which don't provide one
Declaration
public BulkDescriptor TypeQueryString(string typequerystring)
Parameters
Type |
Name |
Description |
string |
typequerystring |
|
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)
Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to all
for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
Declaration
public BulkDescriptor WaitForActiveShards(string waitforactiveshards)
Parameters
Type |
Name |
Description |
string |
waitforactiveshards |
|
Returns
Implements
Extension Methods