From a973197503036278bdf44ebd54d7d442521d7f4d Mon Sep 17 00:00:00 2001 From: BUPTAnderson <229546106@qq.com> Date: Tue, 18 Apr 2017 10:16:37 +0800 Subject: [PATCH] docs: fix search info in transport API docs (#22045) fix some error! --- docs/java-api/search.asciidoc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/java-api/search.asciidoc b/docs/java-api/search.asciidoc index b1eb120486a..cd185212da3 100644 --- a/docs/java-api/search.asciidoc +++ b/docs/java-api/search.asciidoc @@ -161,11 +161,9 @@ For example, if you have a file named `config/scripts/template_gender.mustache` [source,js] -------------------------------------------------- { - "template" : { - "query" : { - "match" : { - "gender" : "{{param_gender}}" - } + "query" : { + "match" : { + "gender" : "{{param_gender}}" } } } @@ -200,11 +198,9 @@ client.admin().cluster().preparePutStoredScript() .setId("template_gender") .setSource(new BytesArray( "{\n" + - " \"template\" : {\n" + - " \"query\" : {\n" + - " \"match\" : {\n" + - " \"gender\" : \"{{param_gender}}\"\n" + - " }\n" + + " \"query\" : {\n" + + " \"match\" : {\n" + + " \"gender\" : \"{{param_gender}}\"\n" + " }\n" + " }\n" + "}")).get();