added new API methods

This commit is contained in:
Spencer Alger
2014-07-24 10:55:22 -07:00
parent 153c8e3812
commit ad489fd5f5
3 changed files with 371 additions and 361 deletions

View File

@ -1375,6 +1375,46 @@ api.deleteByQuery = ca({
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request
*
@ -1601,6 +1641,27 @@ api.get = ca({
}
});
/**
* Perform a [getScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request
*
@ -1677,6 +1738,23 @@ api.getSource = ca({
}
});
/**
* Perform a [getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request
*
@ -1785,126 +1863,6 @@ api.index = ca({
method: 'POST'
});
/**
* Perform a [putScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [deleteScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [getScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
api.indices = function IndicesNS(transport) {
this.transport = transport;
};
@ -4735,6 +4693,48 @@ api.ping = ca({
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request
*

View File

@ -1416,6 +1416,46 @@ api.deleteByQuery = ca({
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request
*
@ -1642,6 +1682,27 @@ api.get = ca({
}
});
/**
* Perform a [getScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request
*
@ -1718,6 +1779,23 @@ api.getSource = ca({
}
});
/**
* Perform a [getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request
*
@ -1826,126 +1904,6 @@ api.index = ca({
method: 'POST'
});
/**
* Perform a [putScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [deleteScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [getScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
api.indices = function IndicesNS(transport) {
this.transport = transport;
};
@ -2526,6 +2484,7 @@ api.indices.prototype.existsType = ca({
* @param {Object} params - An object with parameters used to carry out this action
* @param {Boolean} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {Boolean} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {Boolean} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
@ -2539,6 +2498,10 @@ api.indices.prototype.flush = ca({
full: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
@ -4776,6 +4739,48 @@ api.ping = ca({
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request
*
@ -5572,7 +5577,7 @@ api.termvector = ca({
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.consistency - Explicit write consistency setting for the operation
* @param {String, String[], Boolean} params.fields - A comma-separated list of fields to return in the response
* @param {String} params.lang - The script language (default: mvel)
* @param {String} params.lang - The script language (default: groovy)
* @param {String} params.parent - ID of the parent document
* @param {Boolean} params.refresh - Refresh the index after performing the operation
* @param {String} [params.replication=sync] - Specific replication type

View File

@ -1416,6 +1416,46 @@ api.deleteByQuery = ca({
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/docs-get.html) request
*
@ -1642,6 +1682,27 @@ api.get = ca({
}
});
/**
* Perform a [getScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/docs-get.html) request
*
@ -1718,6 +1779,23 @@ api.getSource = ca({
}
});
/**
* Perform a [getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/docs-index_.html) request
*
@ -1826,126 +1904,6 @@ api.index = ca({
method: 'POST'
});
/**
* Perform a [putScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [deleteScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [getScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
api.indices = function IndicesNS(transport) {
this.transport = transport;
};
@ -2526,6 +2484,7 @@ api.indices.prototype.existsType = ca({
* @param {Object} params - An object with parameters used to carry out this action
* @param {Boolean} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {Boolean} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {Boolean} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
@ -2539,6 +2498,10 @@ api.indices.prototype.flush = ca({
full: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
@ -4723,6 +4686,48 @@ api.ping = ca({
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Script ID
* @param {String} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {String} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
*