Class BulkUpdateDescriptor<TDocument, TPartialDocument>
Inheritance
BulkUpdateDescriptor<TDocument, TPartialDocument>
Assembly: OpenSearch.Client.dll
Syntax
[DataContract]
public class BulkUpdateDescriptor<TDocument, TPartialDocument> : BulkOperationDescriptorBase<BulkUpdateDescriptor<TDocument, TPartialDocument>, IBulkUpdateOperation<TDocument, TPartialDocument>>, IDescriptor, IBulkUpdateOperation<TDocument, TPartialDocument>, IBulkOperation where TDocument : class where TPartialDocument : class
Type Parameters
Name |
Description |
TDocument |
|
TPartialDocument |
|
Properties
|
Edit this page
View Source
BulkOperationClrType
Declaration
protected override Type BulkOperationClrType { get; }
Property Value
Overrides
|
Edit this page
View Source
BulkOperationType
Declaration
protected override string BulkOperationType { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
Doc(TPartialDocument)
The partial update document to be merged on to the existing object.
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> Doc(TPartialDocument @object)
Parameters
Type |
Name |
Description |
TPartialDocument |
object |
|
Returns
|
Edit this page
View Source
DocAsUpsert(bool?)
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> DocAsUpsert(bool? partialDocumentAsUpsert = true)
Parameters
Type |
Name |
Description |
bool? |
partialDocumentAsUpsert |
|
Returns
|
Edit this page
View Source
GetBulkOperationBody()
Declaration
protected override object GetBulkOperationBody()
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
|
Edit this page
View Source
IdFrom(TDocument, bool)
Infers the id of the object to update from the provided
object
.
See
Doc(TPartialDocument) to apply a partial object merge.
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> IdFrom(TDocument @object, bool useAsUpsert = false)
Parameters
Type |
Name |
Description |
TDocument |
object |
|
bool |
useAsUpsert |
|
Returns
|
Edit this page
View Source
IfPrimaryTerm(long?)
Operations can be made conditional and only be performed if the last modification to the document was assigned the primary term.
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> IfPrimaryTerm(long? primaryTerm)
Parameters
Type |
Name |
Description |
long? |
primaryTerm |
|
Returns
|
Edit this page
View Source
IfSequenceNumber(long?)
Operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number.
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> IfSequenceNumber(long? seqNo)
Parameters
Type |
Name |
Description |
long? |
seqNo |
|
Returns
|
Edit this page
View Source
RetriesOnConflict(int?)
How many times an update should be retried in the case of a version conflict.
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> RetriesOnConflict(int? retriesOnConflict)
Parameters
Type |
Name |
Description |
int? |
retriesOnConflict |
|
Returns
|
Edit this page
View Source
Script(Func<ScriptDescriptor, IScript>)
A script to specify the update.
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> Script(Func<ScriptDescriptor, IScript> scriptSelector)
Parameters
Returns
|
Edit this page
View Source
ScriptedUpsert(bool?)
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 BulkUpdateDescriptor<TDocument, TPartialDocument> ScriptedUpsert(bool? scriptedUpsert = true)
Parameters
Type |
Name |
Description |
bool? |
scriptedUpsert |
|
Returns
|
Edit this page
View Source
Source(Union<bool, ISourceFilter>)
True or false to return the _source field or not, or a list of fields to return.
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> Source(Union<bool, ISourceFilter> source)
Parameters
Returns
|
Edit this page
View Source
Upsert(TDocument)
A document to upsert when the specified document to be updated is not found
Declaration
public BulkUpdateDescriptor<TDocument, TPartialDocument> Upsert(TDocument @object)
Parameters
Type |
Name |
Description |
TDocument |
object |
|
Returns
Implements
Extension Methods