Adding javadoc to UpdateRequestBuilder for a couple of details it took me a while to find.

This commit is contained in:
Daniel Winterstein 2014-01-24 00:24:06 +00:00 committed by Luca Cavanna
parent 233279bb64
commit 08be94b455
1 changed files with 10 additions and 0 deletions

View File

@ -78,6 +78,12 @@ public class UpdateRequestBuilder extends InstanceShardOperationRequestBuilder<U
/**
* The script to execute. Note, make sure not to send different script each times and instead
* use script params if possible with the same (automatically compiled) script.
* <p>
* The script works with the variable <code>ctx</code>, which is bound to the entry,
* e.g. <code>ctx._source.mycounter += 1</code>.
*
* @see #setScriptLang(String)
* @see #setScriptParams(Map)
*/
public UpdateRequestBuilder setScript(String script) {
request.script(script);
@ -86,6 +92,10 @@ public class UpdateRequestBuilder extends InstanceShardOperationRequestBuilder<U
/**
* The language of the script to execute.
* Valid options are: mvel, js, groovy, python, and native (Java)<br>
* Default: mvel
* <p>
* Ref: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html
*/
public UpdateRequestBuilder setScriptLang(String scriptLang) {
request.scriptLang(scriptLang);