case class Script(script: String, lang: Option[String] = None, scriptType: ScriptType = ScriptType.Source, params: Map[String, Any] = Map.empty, options: Map[String, String] = Map.empty, paramsRaw: Map[String, String] = Map.empty) extends Product with Serializable
A script that can be used in queries (ex: Painless scripting).
- script
the script source
- lang
the language of the script (defaults to Painless)
- scriptType
the type of script (see ScriptType.Source)
- params
the parameters of the script which will be automatically-serialized
- options
the options for this script
- paramsRaw
the parameters of the script which are already serialized
- Alphabetic
- By Inheritance
- Script
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Script(script: String, lang: Option[String] = None, scriptType: ScriptType = ScriptType.Source, params: Map[String, Any] = Map.empty, options: Map[String, String] = Map.empty, paramsRaw: Map[String, String] = Map.empty)
- script
the script source
- lang
the language of the script (defaults to Painless)
- scriptType
the type of script (see ScriptType.Source)
- params
the parameters of the script which will be automatically-serialized
- options
the options for this script
- paramsRaw
the parameters of the script which are already serialized
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lang(lang: String): Script
Sets the script language.
- val lang: Option[String]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val options: Map[String, String]
- def param(name: String, value: Any): Script
Sets a parameter that will be automatically-serialized before sending to Elasticsearch.
Sets a parameter that will be automatically-serialized before sending to Elasticsearch.
- name
the parameter key
- value
the parameter value as a primitive type (Double, BigInt, Seq, Map, etc.); for all the primitive types supported, see com.sksamuel.elastic4s.json.XContentBuilder#autofield; for sending objects, see paramRaw and paramObject
- def paramObject[T](name: String, value: T)(implicit serializer: ParamSerializer[T]): Script
Sets a parameter with an object value, which is serialized with the given implicit serializer.
Sets a parameter with an object value, which is serialized with the given implicit serializer.
- T
object's type
- name
the parameter key
- value
the parameter value
- serializer
the parameter serializer (see ParamSerializer)
- def paramRaw(name: String, value: String): Script
Sets an already-serialized parameter.
Sets an already-serialized parameter.
- name
the parameter key
- value
the parameter serialized value as a string
- def params(map: Map[String, Any]): Script
- def params(seq: Seq[(String, Any)]): Script
- def params(first: (String, Any), rest: (String, AnyRef)*): Script
- val params: Map[String, Any]
- def paramsObject[T](map: Map[String, T])(implicit serializer: ParamSerializer[T]): Script
- def paramsObject[T](seq: Seq[(String, T)])(implicit serializer: ParamSerializer[T]): Script
- def paramsObject[T](first: (String, T), rest: (String, T)*)(implicit serializer: ParamSerializer[T]): Script
- def paramsRaw(map: Map[String, String]): Script
- def paramsRaw(seq: Seq[(String, String)]): Script
- def paramsRaw(first: (String, String), rest: (String, String)*): Script
- val paramsRaw: Map[String, String]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val script: String
- def scriptType(scriptType: ScriptType): Script
- def scriptType(tpe: String): Script
- val scriptType: ScriptType
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)