Enum elasticsearch_dsl::search::queries::params::ScriptLang
source · [−]pub enum ScriptLang {
Painless,
Expression,
Mustache,
Custom(String),
}
Expand description
Available scripting language
Variants
Painless
Painless is a performant, secure scripting language designed specifically for Elasticsearch. You can use Painless to safely write inline and stored scripts anywhere scripts are supported in Elasticsearch.
Painless provides numerous capabilities that center around the following core principles:
-
Safety: Ensuring the security of your cluster is of utmost importance. To that end, Painless uses a fine-grained allowlist with a granularity down to the members of a class. Anything that is not part of the allowlist results in a compilation error. See the Painless API Reference for a complete list of available classes, methods, and fields per script context.
-
Performance: Painless compiles directly into JVM bytecode to take advantage of all possible optimizations that the JVM provides. Also, Painless typically avoids features that require additional slower checks at runtime.
-
Simplicity: Painless implements a syntax with a natural familiarity to anyone with some basic coding experience. Painless uses a subset of Java syntax with some additional improvements to enhance readability and remove boilerplate.
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-painless.html
Expression
Lucene’s expressions compile a javascript
expression to bytecode. They are designed for
high-performance custom ranking and sorting functions and are enabled for inline
and stored
scripting by default.
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-expression.html
Mustache
A template language to search with templates
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
Custom(String)
Custom language refer to Advanced scripts using script engines
Trait Implementations
sourceimpl Clone for ScriptLang
impl Clone for ScriptLang
sourcefn clone(&self) -> ScriptLang
fn clone(&self) -> ScriptLang
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ScriptLang
impl Debug for ScriptLang
sourceimpl<T> From<T> for ScriptLang where
T: ToString,
impl<T> From<T> for ScriptLang where
T: ToString,
sourceimpl PartialEq<ScriptLang> for ScriptLang
impl PartialEq<ScriptLang> for ScriptLang
sourcefn eq(&self, other: &ScriptLang) -> bool
fn eq(&self, other: &ScriptLang) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ScriptLang) -> bool
fn ne(&self, other: &ScriptLang) -> bool
This method tests for !=
.
sourceimpl Serialize for ScriptLang
impl Serialize for ScriptLang
impl Eq for ScriptLang
impl StructuralEq for ScriptLang
impl StructuralPartialEq for ScriptLang
Auto Trait Implementations
impl RefUnwindSafe for ScriptLang
impl Send for ScriptLang
impl Sync for ScriptLang
impl Unpin for ScriptLang
impl UnwindSafe for ScriptLang
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more