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