Class ForeachProcessorDescriptor<T>
Processes elements in an array of unknown length.
All processors can operate on elements inside an array, but if all elements of
an array need to be processed in the same way, defining a processor for each
element becomes cumbersome and tricky because it is likely that the number of
elements in an array is unknown. For this reason the foreach processor exists.
By specifying the field holding array elements and a processor that defines what
should happen to each element, array fields can easily be preprocessed.
Inheritance
ForeachProcessorDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class ForeachProcessorDescriptor<T> : ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>, IDescriptor, IForeachProcessor, 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)
Declaration
public ForeachProcessorDescriptor<T> Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
Declaration
public ForeachProcessorDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> objectPath)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
IgnoreMissing(bool?)
If true
and Field does not exist or is null,
the processor quietly exits without modifying the document. Default is false
Declaration
public ForeachProcessorDescriptor<T> IgnoreMissing(bool? ignoreMissing = true)
Parameters
Type |
Name |
Description |
bool? |
ignoreMissing |
|
Returns
|
Edit this page
View Source
Processor(Func<ProcessorsDescriptor, IPromise<IList<IProcessor>>>)
The processor to execute against each field
Declaration
public ForeachProcessorDescriptor<T> Processor(Func<ProcessorsDescriptor, IPromise<IList<IProcessor>>> selector)
Parameters
Returns
Implements
Extension Methods