Search Results for

    Show / Hide Table of Contents

    Class ScriptDescriptorBase<TDescriptor, TInterface>

    A script to execute to provide custom computation

    Inheritance
    object
    DescriptorBase<TDescriptor, TInterface>
    ScriptDescriptorBase<TDescriptor, TInterface>
    IndexedScriptDescriptor
    InlineScriptDescriptor
    Implements
    IDescriptor
    IScript
    Inherited Members
    DescriptorBase<TDescriptor, TInterface>.Self
    DescriptorBase<TDescriptor, TInterface>.Assign<TValue>(TValue, Action<TInterface, 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 abstract class ScriptDescriptorBase<TDescriptor, TInterface> : DescriptorBase<TDescriptor, TInterface>, IDescriptor, IScript where TDescriptor : ScriptDescriptorBase<TDescriptor, TInterface>, TInterface, IScript where TInterface : class, IScript
    Type Parameters
    Name Description
    TDescriptor
    TInterface

    Methods

    | Edit this page View Source

    Lang(ScriptLang)

    Language of script.

    Declaration
    public TDescriptor Lang(ScriptLang lang)
    Parameters
    Type Name Description
    ScriptLang lang

    language

    Returns
    Type Description
    TDescriptor

    this

    | Edit this page View Source

    Lang(string)

    Language of script.

    Declaration
    public TDescriptor Lang(string lang)
    Parameters
    Type Name Description
    string lang

    language

    Returns
    Type Description
    TDescriptor

    this

    | Edit this page View Source

    Params(Dictionary<string, object>)

    Scripts are compiled and cached for faster execution. If the same script can be used, just with different parameters provided, it is preferable to use the ability to pass parameters to the script itself.

    Declaration
    public TDescriptor Params(Dictionary<string, object> scriptParams)
    Parameters
    Type Name Description
    Dictionary<string, object> scriptParams
    Returns
    Type Description
    TDescriptor

    this

    Examples

    script: "doc['num1'].value > param1" param: "param1" = 5

    | Edit this page View Source

    Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>>)

    Scripts are compiled and cached for faster execution. If the same script can be used, just with different parameters provided, it is preferable to use the ability to pass parameters to the script itself.

    Declaration
    public TDescriptor Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> paramsDictionary)
    Parameters
    Type Name Description
    Func<FluentDictionary<string, object>, FluentDictionary<string, object>> paramsDictionary

    param

    Returns
    Type Description
    TDescriptor

    this

    Examples

    script: "doc['num1'].value > param1" param: "param1" = 5

    Implements

    IDescriptor
    IScript

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Methods
      • Lang(ScriptLang)
      • Lang(string)
      • Params(Dictionary<string, object>)
      • Params(Func<FluentDictionary<string, object>, FluentDictionary<string, object>>)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX