Class BulkRequest
Request for Bulk
https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/
Inheritance
Inherited Members
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class BulkRequest : PlainRequestBase<BulkRequestParameters>, IBulkRequest, IRequest<BulkRequestParameters>, IRequest
Constructors
| Edit this page View SourceBulkRequest()
/_bulk
Declaration
public BulkRequest()
BulkRequest(IndexName)
/{index}/_bulk
Declaration
public BulkRequest(IndexName index)
Parameters
Type | Name | Description |
---|---|---|
IndexName | index | Optional, accepts null |
Properties
| Edit this page View SourceOperations
Declaration
public BulkOperationsCollection<IBulkOperation> Operations { get; set; }
Property Value
Type | Description |
---|---|
BulkOperationsCollection<IBulkOperation> |
Pipeline
The pipeline id to preprocess incoming documents with
Declaration
public string Pipeline { get; set; }
Property Value
Type | Description |
---|---|
string |
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 Refresh? Refresh { get; set; }
Property Value
Type | Description |
---|---|
Refresh? |
RequireAlias
Sets require_alias for all incoming documents. Defaults to unset (false)
Declaration
public bool? RequireAlias { get; set; }
Property Value
Type | Description |
---|---|
bool? |
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 OSC 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 Routing Routing { get; set; }
Property Value
Type | Description |
---|---|
Routing |
Self
Declaration
protected IBulkRequest Self { get; }
Property Value
Type | Description |
---|---|
IBulkRequest |
SourceEnabled
Whether the _source should be included in the response.
Declaration
public bool? SourceEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool? |
SourceExcludes
Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
Declaration
public Fields SourceExcludes { get; set; }
Property Value
Type | Description |
---|---|
Fields |
SourceIncludes
Default list of fields to extract and return from the _source field, can be overridden on each sub-request
Declaration
public Fields SourceIncludes { get; set; }
Property Value
Type | Description |
---|---|
Fields |
Timeout
Explicit operation timeout
Declaration
public Time Timeout { get; set; }
Property Value
Type | Description |
---|---|
Time |
TypeQueryString
Default document type for items which don't provide one
Declaration
public string TypeQueryString { get; set; }
Property Value
Type | Description |
---|---|
string |
WaitForActiveShards
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 string WaitForActiveShards { get; set; }
Property Value
Type | Description |
---|---|
string |