NEST by Elastic and contributors

<PackageReference Include="NEST" Version="5.6.1" />

.NET API 5,053,440 bytes

 BulkUpdateDescriptor<TDocument, TPartialDocument>

public class BulkUpdateDescriptor<TDocument, TPartialDocument> : BulkOperationDescriptorBase<BulkUpdateDescriptor<TDocument, TPartialDocument>, IBulkUpdateOperation<TDocument, TPartialDocument>>, IBulkUpdateOperation<TDocument, TPartialDocument>, IBulkOperation

public BulkUpdateDescriptor<TDocument, TPartialDocument> Doc(TPartialDocument object)

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.

public BulkUpdateDescriptor<TDocument, TPartialDocument> RetriesOnConflict(int? retriesOnConflict)

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.

public BulkUpdateDescriptor<TDocument, TPartialDocument> ScriptedUpsert(bool scriptedUpsert = true)

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

public BulkUpdateDescriptor<TDocument, TPartialDocument> Upsert(TDocument object)

A document to upsert when the specified document to be updated is not found