Skip to content

Commit

Permalink
[Docs] Align callouts in search.asciidoc (#35897)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Büscher committed Nov 26, 2018
1 parent 7e8db3b commit d3681ae
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/java-api/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ To execute a stored templates, use `ScriptService.ScriptType.STORED`:
[source,java]
--------------------------------------------------
SearchResponse sr = new SearchTemplateRequestBuilder(client)
.setScript("template_gender") <1>
.setScript("template_gender") <1>
.setScriptType(ScriptType.STORED) <2>
.setScriptParams(template_params) <3>
.setRequest(new SearchRequest()) <4>
.get() <5>
.getResponse(); <6>
.setScriptParams(template_params) <3>
.setRequest(new SearchRequest()) <4>
.get() <5>
.getResponse(); <6>
--------------------------------------------------
<1> template name
<2> template stored in the cluster state
Expand All @@ -229,18 +229,18 @@ You can also execute inline templates:
[source,java]
--------------------------------------------------
sr = new SearchTemplateRequestBuilder(client)
.setScript("{\n" + <1>
.setScript("{\n" + <1>
" \"query\" : {\n" +
" \"match\" : {\n" +
" \"gender\" : \"{{param_gender}}\"\n" +
" }\n" +
" }\n" +
"}")
.setScriptType(ScriptType.INLINE) <2>
.setScriptParams(template_params) <3>
.setRequest(new SearchRequest()) <4>
.get() <5>
.getResponse(); <6>
.setScriptParams(template_params) <3>
.setRequest(new SearchRequest()) <4>
.get() <5>
.getResponse(); <6>
--------------------------------------------------
<1> template's body
<2> template is passed inline
Expand Down

0 comments on commit d3681ae

Please sign in to comment.