[DOCS] Replaces deprecated ScriptService.ScriptType.INLINE with supported script in Java update docs. (#49424)

This commit is contained in:
István Zoltán Szabó 2019-11-22 14:17:44 +01:00 committed by GitHub
parent 276b6c67f4
commit 56d97dcb6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ Or you can use `prepareUpdate()` method:
client.prepareUpdate("ttl", "doc", "1") client.prepareUpdate("ttl", "doc", "1")
.setScript(new Script( .setScript(new Script(
"ctx._source.gender = \"male\"", <1> "ctx._source.gender = \"male\"", <1>
ScriptService.ScriptType.INLINE, null, null)) ScriptType.INLINE, null, null))
.get(); .get();
client.prepareUpdate("ttl", "doc", "1") client.prepareUpdate("ttl", "doc", "1")
@ -35,7 +35,7 @@ client.prepareUpdate("ttl", "doc", "1")
.get(); .get();
-------------------------------------------------- --------------------------------------------------
<1> Your script. It could also be a locally stored script name. <1> Your script. It could also be a locally stored script name.
In that case, you'll need to use `ScriptService.ScriptType.FILE` In that case, you'll need to use `ScriptType.FILE`.
<2> Document which will be merged to the existing one. <2> Document which will be merged to the existing one.
Note that you can't provide both `script` and `doc`. Note that you can't provide both `script` and `doc`.