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:
David Pilato 2016-12-12 14:21:10 +01:00
parent 571b20137a
commit 87a016a155
1 changed files with 2 additions and 2 deletions

View File

@ -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>