java.lang.Object
java.lang.Enum<PainlessContext>
co.elastic.clients.elasticsearch.core.scripts_painless_execute.PainlessContext
All Implemented Interfaces:
JsonEnum, JsonpSerializable, Serializable, Comparable<PainlessContext>, Constable

@JsonpDeserializable public enum PainlessContext extends Enum<PainlessContext> implements JsonEnum
See Also:
  • Enum Constant Details

    • PainlessTest

      public static final PainlessContext PainlessTest
      The default context if no other context is specified.
    • Filter

      public static final PainlessContext Filter
      Treats scripts as if they were run inside a script query.
    • Score

      public static final PainlessContext Score
      Treats scripts as if they were run inside a script_score function in a function_score query.
    • BooleanField

      public static final PainlessContext BooleanField
      The context for boolean fields. The script returns a true or false response.
    • DateField

      public static final PainlessContext DateField
      The context for date fields. emit takes a long value and the script returns a sorted list of dates.
    • DoubleField

      public static final PainlessContext DoubleField
      The context for double numeric fields. The script returns a sorted list of double values.
    • GeoPointField

      public static final PainlessContext GeoPointField
      The context for geo-point fields. emit takes two double parameters, the latitude and longitude values, and the script returns an object in GeoJSON format containing the coordinates for the geo point.
    • IpField

      public static final PainlessContext IpField
      The context for ip fields. The script returns a sorted list of IP addresses.
    • KeywordField

      public static final PainlessContext KeywordField
      The context for keyword fields. The script returns a sorted list of string values.
    • LongField

      public static final PainlessContext LongField
      The context for long numeric fields. The script returns a sorted list of long values.
    • CompositeField

      public static final PainlessContext CompositeField
      The context for composite runtime fields. The script returns a map of values.
  • Field Details

  • Method Details

    • values

      public static PainlessContext[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PainlessContext valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • jsonValue

      public String jsonValue()
      Specified by:
      jsonValue in interface JsonEnum