parent
12c8423ec9
commit
a973197503
|
@ -161,14 +161,12 @@ For example, if you have a file named `config/scripts/template_gender.mustache`
|
|||
[source,js]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"template" : {
|
||||
"query" : {
|
||||
"match" : {
|
||||
"gender" : "{{param_gender}}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// NOTCONSOLE
|
||||
|
||||
|
@ -200,13 +198,11 @@ client.admin().cluster().preparePutStoredScript()
|
|||
.setId("template_gender")
|
||||
.setSource(new BytesArray(
|
||||
"{\n" +
|
||||
" \"template\" : {\n" +
|
||||
" \"query\" : {\n" +
|
||||
" \"match\" : {\n" +
|
||||
" \"gender\" : \"{{param_gender}}\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
"}")).get();
|
||||
--------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue