Class BulkUpdateOperation<TDocument, TPartialDocument>
Inheritance
BulkUpdateOperation<TDocument, TPartialDocument>
Assembly: OpenSearch.Client.dll
Syntax
[DataContract]
public class BulkUpdateOperation<TDocument, TPartialDocument> : BulkOperationBase, IBulkUpdateOperation<TDocument, TPartialDocument>, IBulkOperation where TDocument : class where TPartialDocument : class
Type Parameters
Name |
Description |
TDocument |
|
TPartialDocument |
|
Constructors
|
Edit this page
View Source
BulkUpdateOperation(Id)
Declaration
public BulkUpdateOperation(Id id)
Parameters
Type |
Name |
Description |
Id |
id |
|
|
Edit this page
View Source
BulkUpdateOperation(TDocument, bool)
Create a new bulk operation
Declaration
public BulkUpdateOperation(TDocument idFrom, bool useIdFromAsUpsert = false)
Parameters
Type |
Name |
Description |
TDocument |
idFrom |
Use this document to infer the id from
|
bool |
useIdFromAsUpsert |
Use the document to infer on as the upsert document in this update operation
|
|
Edit this page
View Source
BulkUpdateOperation(TDocument, TPartialDocument, bool)
Create a new Bulk Operation
Declaration
public BulkUpdateOperation(TDocument idFrom, TPartialDocument update, bool useIdFromAsUpsert = false)
Parameters
Type |
Name |
Description |
TDocument |
idFrom |
Use this document to infer the id from
|
TPartialDocument |
update |
The partial update document (doc) to send as update
|
bool |
useIdFromAsUpsert |
Use the document to infer on as the upsert document in this update operation
|
Properties
|
Edit this page
View Source
ClrType
Declaration
protected override Type ClrType { get; }
Property Value
Overrides
|
Edit this page
View Source
Doc
The partial update document to be merged on to the existing object.
Declaration
public TPartialDocument Doc { get; set; }
Property Value
Type |
Description |
TPartialDocument |
|
|
Edit this page
View Source
DocAsUpsert
Instead of sending a partial doc with Doc plus an upsert doc
with Upsert, setting DocAsUpsert to true
will
use the contents of doc as the upsert value.
Declaration
public bool? DocAsUpsert { get; set; }
Property Value
|
Edit this page
View Source
IdFrom
Infers the id of the object to update from the provided object.
See Doc to apply a partial object merge.
Declaration
public TDocument IdFrom { get; set; }
Property Value
Type |
Description |
TDocument |
|
|
Edit this page
View Source
IfPrimaryTerm
Declaration
public long? IfPrimaryTerm { get; set; }
Property Value
|
Edit this page
View Source
IfSequenceNumber
Declaration
public long? IfSequenceNumber { get; set; }
Property Value
|
Edit this page
View Source
Operation
Declaration
protected override string Operation { get; }
Property Value
Overrides
|
Edit this page
View Source
Script
A script to specify the update.
Declaration
public IScript Script { get; set; }
Property Value
|
Edit this page
View Source
ScriptedUpsert
If you would like your script to run regardless of whether the document exists or not — i.e. the script handles
initializing the document instead of the upsert element — then set scripted_upsert to true
Declaration
public bool? ScriptedUpsert { get; set; }
Property Value
|
Edit this page
View Source
Source
True or false to return the _source field or not, or a list of fields to return.
Declaration
public Union<bool, ISourceFilter> Source { get; set; }
Property Value
|
Edit this page
View Source
Upsert
A document to upsert when the specified document to be updated is not found
Declaration
public TDocument Upsert { get; set; }
Property Value
Type |
Description |
TDocument |
|
Methods
|
Edit this page
View Source
GetBody()
Declaration
protected override object GetBody()
Returns
Overrides
|
Edit this page
View Source
GetIdForOperation(Inferrer)
Declaration
protected override Id GetIdForOperation(Inferrer inferrer)
Parameters
Returns
Overrides
|
Edit this page
View Source
GetRoutingForOperation(Inferrer)
Declaration
protected override Routing GetRoutingForOperation(Inferrer inferrer)
Parameters
Returns
Overrides
Implements
Extension Methods