Search Results for

    Show / Hide Table of Contents

    Class ScriptBase

    A script to execute to provide custom computation

    Inheritance
    object
    ScriptBase
    IndexedScript
    InlineScript
    Implements
    IScript
    Inherited Members
    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 ScriptBase : IScript

    Properties

    | Edit this page View Source

    Lang

    Language of script.

    Declaration
    public string Lang { get; set; }
    Property Value
    Type Description
    string

    this

    | Edit this page View Source

    Params

    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 Dictionary<string, object> Params { get; set; }
    Property Value
    Type Description
    Dictionary<string, object>

    this

    Examples

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

    Operators

    | Edit this page View Source

    implicit operator ScriptBase(string)

    Implicit conversion from string to InlineScript

    Declaration
    public static implicit operator ScriptBase(string script)
    Parameters
    Type Name Description
    string script
    Returns
    Type Description
    ScriptBase

    Implements

    IScript

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Lang
      • Params
    • Operators
      • implicit operator ScriptBase(string)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX