BulkUpdateDescriptor<TDocument, TPartialDocument>
public class BulkUpdateDescriptor<TDocument, TPartialDocument> : BulkOperationDescriptorBase<BulkUpdateDescriptor<TDocument, TPartialDocument>, IBulkUpdateOperation<TDocument, TPartialDocument>>, IBulkUpdateOperation<TDocument, TPartialDocument>, IBulkOperation
public BulkUpdateDescriptor()
The partial update document to be merged on to the existing object.
public BulkUpdateDescriptor<TDocument, TPartialDocument> DocAsUpsert(bool partialDocumentAsUpsert = true)
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.
public BulkUpdateDescriptor<TDocument, TPartialDocument> IdFrom(TDocument object, bool useAsUpsert = false)
Infers the id of the object to update from the provided object.
See Doc to apply a partial object merge.
How many times an update should be retried in the case of a version conflict.
public BulkUpdateDescriptor<TDocument, TPartialDocument> Script(Func<ScriptDescriptor, IScript> scriptSelector)
A script to specify the update.
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
A document to upsert when the specified document to be updated is not found