Skip to content

Commit

Permalink
[DOCS] Replaces deprecated ScriptService.ScriptType.INLINE with suppo…
Browse files Browse the repository at this point in the history
…rted script in Java update docs. (#49424)
  • Loading branch information
szabosteve committed Nov 22, 2019
1 parent 837a684 commit 0eca5aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/java-api/docs/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Or you can use `prepareUpdate()` method:
client.prepareUpdate("ttl", "doc", "1")
.setScript(new Script(
"ctx._source.gender = \"male\"", <1>
ScriptService.ScriptType.INLINE, null, null))
ScriptType.INLINE, null, null))
.get();
client.prepareUpdate("ttl", "doc", "1")
Expand All @@ -35,7 +35,7 @@ client.prepareUpdate("ttl", "doc", "1")
.get();
--------------------------------------------------
<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.

Note that you can't provide both `script` and `doc`.
Expand Down

0 comments on commit 0eca5aa

Please sign in to comment.