[Docs] Align callouts in search.asciidoc (#35897)
This commit is contained in:
parent
5c11b8612a
commit
4d525e3e33
|
@ -210,12 +210,12 @@ To execute a stored templates, use `ScriptService.ScriptType.STORED`:
|
||||||
[source,java]
|
[source,java]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
SearchResponse sr = new SearchTemplateRequestBuilder(client)
|
SearchResponse sr = new SearchTemplateRequestBuilder(client)
|
||||||
.setScript("template_gender") <1>
|
.setScript("template_gender") <1>
|
||||||
.setScriptType(ScriptType.STORED) <2>
|
.setScriptType(ScriptType.STORED) <2>
|
||||||
.setScriptParams(template_params) <3>
|
.setScriptParams(template_params) <3>
|
||||||
.setRequest(new SearchRequest()) <4>
|
.setRequest(new SearchRequest()) <4>
|
||||||
.get() <5>
|
.get() <5>
|
||||||
.getResponse(); <6>
|
.getResponse(); <6>
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
<1> template name
|
<1> template name
|
||||||
<2> template stored in the cluster state
|
<2> template stored in the cluster state
|
||||||
|
@ -229,7 +229,7 @@ You can also execute inline templates:
|
||||||
[source,java]
|
[source,java]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
sr = new SearchTemplateRequestBuilder(client)
|
sr = new SearchTemplateRequestBuilder(client)
|
||||||
.setScript("{\n" + <1>
|
.setScript("{\n" + <1>
|
||||||
" \"query\" : {\n" +
|
" \"query\" : {\n" +
|
||||||
" \"match\" : {\n" +
|
" \"match\" : {\n" +
|
||||||
" \"gender\" : \"{{param_gender}}\"\n" +
|
" \"gender\" : \"{{param_gender}}\"\n" +
|
||||||
|
@ -237,10 +237,10 @@ sr = new SearchTemplateRequestBuilder(client)
|
||||||
" }\n" +
|
" }\n" +
|
||||||
"}")
|
"}")
|
||||||
.setScriptType(ScriptType.INLINE) <2>
|
.setScriptType(ScriptType.INLINE) <2>
|
||||||
.setScriptParams(template_params) <3>
|
.setScriptParams(template_params) <3>
|
||||||
.setRequest(new SearchRequest()) <4>
|
.setRequest(new SearchRequest()) <4>
|
||||||
.get() <5>
|
.get() <5>
|
||||||
.getResponse(); <6>
|
.getResponse(); <6>
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
<1> template's body
|
<1> template's body
|
||||||
<2> template is passed inline
|
<2> template is passed inline
|
||||||
|
|
Loading…
Reference in New Issue