2014-07-14 09:37:55 -04:00
|
|
|
{
|
2014-07-16 05:46:55 -04:00
|
|
|
"put_script": {
|
|
|
|
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html",
|
2014-07-14 09:37:55 -04:00
|
|
|
"methods": ["PUT", "POST"],
|
|
|
|
"url": {
|
2014-07-16 05:46:55 -04:00
|
|
|
"path": "/_scripts/{lang}/{id}",
|
|
|
|
"paths": [ "/_scripts/{lang}/{id}" ],
|
2014-07-14 09:37:55 -04:00
|
|
|
"parts": {
|
|
|
|
"id": {
|
|
|
|
"type" : "string",
|
|
|
|
"description" : "Script ID",
|
|
|
|
"required" : true
|
|
|
|
},
|
|
|
|
"lang" : {
|
|
|
|
"type" : "string",
|
|
|
|
"description" : "Script language",
|
|
|
|
"required" : true
|
|
|
|
}
|
2014-09-03 10:50:27 -04:00
|
|
|
},
|
|
|
|
"params" : {
|
|
|
|
"op_type": {
|
|
|
|
"type" : "enum",
|
|
|
|
"options" : ["index", "create"],
|
|
|
|
"default" : "index",
|
|
|
|
"description" : "Explicit operation type"
|
|
|
|
},
|
|
|
|
"version": {
|
|
|
|
"type": "number",
|
|
|
|
"description": "Explicit version number for concurrency control"
|
|
|
|
},
|
|
|
|
"version_type": {
|
|
|
|
"type": "enum",
|
|
|
|
"options": ["internal", "external", "external_gte", "force"],
|
|
|
|
"description": "Specific version type"
|
|
|
|
}
|
2014-07-14 09:37:55 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"body": {
|
|
|
|
"description" : "The document",
|
|
|
|
"required" : true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|