Class SetProcessorDescriptor<T>
Sets one field and associates it with the specified value.
If the field already exists, its value will be replaced with the provided one.
Inheritance
SetProcessorDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class SetProcessorDescriptor<T> : ProcessorDescriptorBase<SetProcessorDescriptor<T>, ISetProcessor>, IDescriptor, ISetProcessor, IProcessor where T : class
Type Parameters
Properties
|
Edit this page
View Source
Name
Declaration
protected override string Name { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
Field(Field)
The field to insert, upsert, or update. Supports template snippets.
Declaration
public SetProcessorDescriptor<T> Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
The field to insert, upsert, or update. Supports template snippets.
Declaration
public SetProcessorDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> objectPath)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
IgnoreEmptyValue(bool?)
If true
and value is a template snippet that evaluates to null or the
empty string, the processor quietly exits without modifying the document.
Defaults to false
.
Declaration
public SetProcessorDescriptor<T> IgnoreEmptyValue(bool? ignoreEmptyValue = true)
Parameters
Type |
Name |
Description |
bool? |
ignoreEmptyValue |
|
Returns
|
Edit this page
View Source
Override(bool?)
If processor will update fields with pre-existing non-null-valued field.
When set to false, such fields will not be touched.
Default is true
Declaration
public SetProcessorDescriptor<T> Override(bool? @override = true)
Parameters
Type |
Name |
Description |
bool? |
override |
|
Returns
|
Edit this page
View Source
Value<TValue>(TValue)
The value to be set for the field. Supports template snippets.
Declaration
public SetProcessorDescriptor<T> Value<TValue>(TValue value)
Parameters
Type |
Name |
Description |
TValue |
value |
|
Returns
Type Parameters
Implements
Extension Methods