Browse Source

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
David Pilato 8 years ago
parent
commit
87a016a155
1 changed files with 2 additions and 2 deletions
  1. 2 2
      docs/java-api/search.asciidoc

+ 2 - 2
docs/java-api/search.asciidoc

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