mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
a857798e1c
The get, put and delete indexed script apis map to get, index and delete api and internally create those corresponding requests. We need to make sure that the original headers are handed over to the new request by passing the original request in the constructor when creating the new one. Also streamlined the support for version and version_type in the REST layer since the parameters were not consistently parsed and set to the internal java API requests. Modified the REST delete template and delete script actions to make use of a client instead of using the `ScriptService` directly. Closes #7569
39 lines
1007 B
JSON
39 lines
1007 B
JSON
{
|
|
"put_template": {
|
|
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html",
|
|
"methods": ["PUT", "POST"],
|
|
"url": {
|
|
"path": "/_search/template/{id}",
|
|
"paths": [ "/_search/template/{id}" ],
|
|
"parts": {
|
|
"id": {
|
|
"type" : "string",
|
|
"description" : "Template ID",
|
|
"required" : true
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"body": {
|
|
"description" : "The document",
|
|
"required" : true
|
|
}
|
|
}
|
|
}
|