mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
Update search template doc for 5.1
From 5.1, we can't use anymore `ScriptService.ScriptType` but `ScriptType`. Related to https://github.com/elastic/elasticsearch/pull/21136#issuecomment-266429243
This commit is contained in:
parent
571b20137a
commit
87a016a155
@ -216,7 +216,7 @@ To execute a stored templates, use `ScriptService.ScriptType.STORED`:
|
||||
--------------------------------------------------
|
||||
SearchResponse sr = new SearchTemplateRequestBuilder(client)
|
||||
.setScript("template_gender") <1>
|
||||
.setScriptType(ScriptService.ScriptType.STORED) <2>
|
||||
.setScriptType(ScriptType.STORED) <2>
|
||||
.setScriptParams(template_params) <3>
|
||||
.setRequest(new SearchRequest()) <4>
|
||||
.get() <5>
|
||||
@ -241,7 +241,7 @@ sr = new SearchTemplateRequestBuilder(client)
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
"}")
|
||||
.setScriptType(ScriptService.ScriptType.INLINE) <2>
|
||||
.setScriptType(ScriptType.INLINE) <2>
|
||||
.setScriptParams(template_params) <3>
|
||||
.setRequest(new SearchRequest()) <4>
|
||||
.get() <5>
|
||||
|
Loading…
x
Reference in New Issue
Block a user