elastic-builder
Advanced tools
Comparing version 2.29.0 to 2.30.0
{ | ||
"name": "elastic-builder", | ||
"version": "2.29.0", | ||
"version": "2.30.0", | ||
"description": "A JavaScript implementation of the elasticsearch Query DSL", | ||
@@ -110,4 +110,5 @@ "main": "src/index.js", | ||
"sandeep952 <sandy335582@gmail.com>", | ||
"florian-lackner365 <florian.lackner@365talents.com>" | ||
"florian-lackner365 <florian.lackner@365talents.com>", | ||
"Alejandro Marulanda <alejokf@gmail.com>" | ||
] | ||
} |
@@ -49,3 +49,3 @@ 'use strict'; | ||
* @param {string} script | ||
* @returns {void} | ||
* @returns {RuntimeField} returns `this` so that calls can be chained. | ||
*/ | ||
@@ -57,2 +57,3 @@ script(script) { | ||
this._isScriptSet = true; | ||
return this; | ||
} | ||
@@ -63,3 +64,3 @@ | ||
* @param {string} type One of `boolean`, `composite`, `date`, `double`, `geo_point`, `ip`, `keyword`, `long`, `lookup`. | ||
* @returns {void} | ||
* @returns {RuntimeField} returns `this` so that calls can be chained. | ||
*/ | ||
@@ -73,5 +74,33 @@ type(type) { | ||
this._isTypeSet = true; | ||
return this; | ||
} | ||
/** | ||
* Specifies the language the script is written in. Defaults to `painless` but | ||
* may be set to any of languages listed in [Scripting](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html). | ||
* | ||
* @param {string} lang The language for the script. | ||
* @returns {RuntimeField} returns `this` so that calls can be chained. | ||
*/ | ||
lang(lang) { | ||
if (!isNil(this._body.script)) { | ||
this._body.script.lang = lang; | ||
} | ||
return this; | ||
} | ||
/** | ||
* Specifies any named parameters that are passed into the script as variables. | ||
* | ||
* @param {Object} params Named parameters to be passed to script. | ||
* @returns {RuntimeField} returns `this` so that calls can be chained. | ||
*/ | ||
params(params) { | ||
if (!isNil(this._body.script)) { | ||
this._body.script.params = params; | ||
} | ||
return this; | ||
} | ||
/** | ||
* Override default `toJSON` to return DSL representation for the `script`. | ||
@@ -78,0 +107,0 @@ * |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1068691
26838