Search Results for

    Show / Hide Table of Contents

    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
    object
    DescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>
    ForeachProcessorDescriptor<T>
    Implements
    IDescriptor
    IForeachProcessor
    IProcessor
    Inherited Members
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.Name
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.Description(string)
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.OnFailure(IEnumerable<IProcessor>)
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.OnFailure(Func<ProcessorsDescriptor, IPromise<IList<IProcessor>>>)
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.If(string)
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.Tag(string)
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.IgnoreFailure(bool?)
    DescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.Self
    DescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.Assign<TValue>(TValue, Action<IForeachProcessor, TValue>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public class ForeachProcessorDescriptor<T> : ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>, IDescriptor, IForeachProcessor, IProcessor where T : class
    Type Parameters
    Name Description
    T

    Properties

    | Edit this page View Source

    Name

    Declaration
    protected override string Name { get; }
    Property Value
    Type Description
    string
    Overrides
    ProcessorDescriptorBase<ForeachProcessorDescriptor<T>, IForeachProcessor>.Name

    Methods

    | Edit this page View Source

    Field(Field)

    The array field

    Declaration
    public ForeachProcessorDescriptor<T> Field(Field field)
    Parameters
    Type Name Description
    Field field
    Returns
    Type Description
    ForeachProcessorDescriptor<T>
    | Edit this page View Source

    Field<TValue>(Expression<Func<T, TValue>>)

    The array field

    Declaration
    public ForeachProcessorDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> objectPath)
    Parameters
    Type Name Description
    Expression<Func<T, TValue>> objectPath
    Returns
    Type Description
    ForeachProcessorDescriptor<T>
    Type Parameters
    Name Description
    TValue
    | 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
    Type Description
    ForeachProcessorDescriptor<T>
    | 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
    Type Name Description
    Func<ProcessorsDescriptor, IPromise<IList<IProcessor>>> selector
    Returns
    Type Description
    ForeachProcessorDescriptor<T>

    Implements

    IDescriptor
    IForeachProcessor
    IProcessor

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Name
    • Methods
      • Field(Field)
      • Field<TValue>(Expression<Func<T, TValue>>)
      • IgnoreMissing(bool?)
      • Processor(Func<ProcessorsDescriptor, IPromise<IList<IProcessor>>>)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX