diff --git a/src/lib/apis/1_x.js b/src/lib/apis/1_x.js index aec910c43..0296f63ee 100644 --- a/src/lib/apis/1_x.js +++ b/src/lib/apis/1_x.js @@ -610,6 +610,44 @@ api.cat.prototype.recovery = ca({ ] }); +/** + * Perform a [cat.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.segments = ca({ + params: { + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': true + } + }, + urls: [ + { + fmt: '/_cat/segments/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/segments' + } + ] +}); + /** * Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-shards.html) request * diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index 92c3a9062..713a1efdd 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -669,6 +669,44 @@ api.cat.prototype.recovery = ca({ ] }); +/** + * Perform a [cat.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-segments.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.h - Comma-separated list of column names to display + * @param {Boolean} params.help - Return help information + * @param {Boolean} [params.v=true] - Verbose mode. Display column headers + * @param {String, String[], Boolean} params.index - A comma-separated list of index names to limit the returned information + */ +api.cat.prototype.segments = ca({ + params: { + h: { + type: 'list' + }, + help: { + type: 'boolean', + 'default': false + }, + v: { + type: 'boolean', + 'default': true + } + }, + urls: [ + { + fmt: '/_cat/segments/<%=index%>', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_cat/segments' + } + ] +}); + /** * Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-shards.html) request * @@ -5991,7 +6029,6 @@ api.termvectors = ca({ * @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: 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 * @param {Number} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0) @@ -6024,9 +6061,6 @@ api.update = ca({ lang: { type: 'string' }, - parent: { - type: 'string' - }, refresh: { type: 'boolean' },