Skip to content

Commit

Permalink
Docs: Drop inline callouts from the java API (#39932)
Browse files Browse the repository at this point in the history
There is a single example in the Java API docs that contains an inline
callout that is incompatible with Asciidoctor:

```
client.prepareUpdate("ttl", "doc", "1")
        .setScript(new Script(
            "ctx._source.gender = \"male\"" <1> , ScriptService.ScriptType.INLINE, null, null))
        .get();
```

This rewrites the example to use an Asciidoctor compatible end of line
callout. It also looks nicer to me because it fits better on the page.

```
client.prepareUpdate("ttl", "doc", "1")
        .setScript(new Script(
            "ctx._source.gender = \"male\"", <1>
            ScriptService.ScriptType.INLINE, null, null))
        .get();
```
  • Loading branch information
nik9000 committed Apr 1, 2019
1 parent 3a12337 commit 1e073d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/java-api/docs/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Or you can use `prepareUpdate()` method:
[source,java]
--------------------------------------------------
client.prepareUpdate("ttl", "doc", "1")
.setScript(new Script("ctx._source.gender = \"male\"" <1> , ScriptService.ScriptType.INLINE, null, null))
.setScript(new Script(
"ctx._source.gender = \"male\"", <1>
ScriptService.ScriptType.INLINE, null, null))
.get();
client.prepareUpdate("ttl", "doc", "1")
Expand Down

0 comments on commit 1e073d1

Please sign in to comment.