added new API methods
This commit is contained in:
@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user