[DOCS][FIX] Fix doc parsing, broken closing block
This commit is contained in:
parent
cbd2a97abd
commit
bc570919ee
|
@ -0,0 +1,36 @@
|
|||
[[indexed-scripts]]
|
||||
== Indexed Scripts API
|
||||
|
||||
The indexed script API allows one to interact with scripts and templates
|
||||
stored in an elasticsearch index. It can be used to create, update, get,
|
||||
and delete indexed scripts and templates.
|
||||
|
||||
[source,java]
|
||||
--------------------------------------------------
|
||||
PutIndexedScriptResponse = client.preparePutIndexedScript()
|
||||
.setScriptLang("groovy")
|
||||
.setId("script1")
|
||||
.setSource("_score * doc['my_numeric_field'].value")
|
||||
.execute()
|
||||
.actionGet();
|
||||
|
||||
GetIndexedScriptResponse = client.prepareGetIndexedScript()
|
||||
.setScriptLang("groovy")
|
||||
.setId("script1")
|
||||
.execute()
|
||||
.actionGet();
|
||||
|
||||
DeleteIndexedScriptResponse = client.prepareDeleteIndexedScript()
|
||||
.setScriptLang("groovy")
|
||||
.setId("script1")
|
||||
.execute()
|
||||
.actionGet();
|
||||
--------------------------------------------------
|
||||
|
||||
To store templates simply use "mustache" for the scriptLang.
|
||||
|
||||
=== Script Language
|
||||
|
||||
The API allows one to set the language of the indexed script being
|
||||
interacted with. If one is not provided the default scripting language
|
||||
will be used.
|
|
@ -241,6 +241,7 @@ POST /_search/template/<templatename>
|
|||
}
|
||||
}
|
||||
}
|
||||
------------------------------------------
|
||||
|
||||
This template can be retrieved by
|
||||
|
||||
|
|
Loading…
Reference in New Issue