pub struct Script { /* private fields */ }
Expand description
Wherever scripting is supported in the Elasticsearch APIs, the syntax follows the same pattern; you specify the language of your script, provide the script logic (or source, and add parameters that are passed into the script.
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html
Implementations§
source§impl Script
impl Script
sourcepub fn lang<S>(self, lang: S) -> Selfwhere
S: Into<ScriptLang>,
pub fn lang<S>(self, lang: S) -> Selfwhere
S: Into<ScriptLang>,
Specifies the language the script is written in. Defaults to painless
.
sourcepub fn param<T, S>(self, name: S, param: T) -> Selfwhere
S: ToString,
T: Serialize,
pub fn param<T, S>(self, name: S, param: T) -> Selfwhere
S: ToString,
T: Serialize,
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.