updated the API to the latest version
This commit is contained in:
@ -27,6 +27,7 @@ NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` co
|
||||
* <<api-ping-1-x,ping>>
|
||||
* <<api-scroll-1-x,scroll>>
|
||||
* <<api-search-1-x,search>>
|
||||
* <<api-searchtemplate-1-x,searchTemplate>>
|
||||
* <<api-suggest-1-x,suggest>>
|
||||
* <<api-termvector-1-x,termvector>>
|
||||
* <<api-update-1-x,update>>
|
||||
@ -78,9 +79,9 @@ NOTE: At this time, you must opt into the 1.x API by setting the `apiVersion` co
|
||||
* <<api-indices-putsettings-1-x,indices.putSettings>>
|
||||
* <<api-indices-puttemplate-1-x,indices.putTemplate>>
|
||||
* <<api-indices-putwarmer-1-x,indices.putWarmer>>
|
||||
* <<api-indices-recovery-1-x,indices.recovery>>
|
||||
* <<api-indices-refresh-1-x,indices.refresh>>
|
||||
* <<api-indices-segments-1-x,indices.segments>>
|
||||
* <<api-indices-snapshotindex-1-x,indices.snapshotIndex>>
|
||||
* <<api-indices-stats-1-x,indices.stats>>
|
||||
* <<api-indices-status-1-x,indices.status>>
|
||||
* <<api-indices-updatealiases-1-x,indices.updateAliases>>
|
||||
@ -1526,6 +1527,31 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-searchtemplate-1-x]]
|
||||
=== `searchTemplate`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.searchTemplate([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String, String[], Boolean` -- A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-suggest-1-x]]
|
||||
=== `suggest`
|
||||
|
||||
@ -2140,8 +2166,6 @@ Options:::
|
||||
* `"m"`
|
||||
* `"g"`
|
||||
|
||||
`local`::
|
||||
`Boolean` -- Return local information, do not retrieve the state from master node (default: false)
|
||||
`masterTimeout`::
|
||||
`Date, Number` -- Explicit operation timeout for connection to master node
|
||||
`h`::
|
||||
@ -3408,6 +3432,35 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-recovery-1-x]]
|
||||
=== `indices.recovery`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.indices.recovery([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `GET` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-recovery.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`detailed`::
|
||||
`Boolean` -- Whether to display detailed information about shard recovery
|
||||
`activeOnly`::
|
||||
`Boolean` -- Display only those recoveries that are currently on-going
|
||||
`human`::
|
||||
`Boolean` -- Whether to return time and byte values in human-readable format.
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-refresh-1-x]]
|
||||
=== `indices.refresh`
|
||||
|
||||
@ -3482,39 +3535,6 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-snapshotindex-1-x]]
|
||||
=== `indices.snapshotIndex`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.indices.snapshotIndex([params, [callback]])
|
||||
--------
|
||||
|
||||
Initiate a snapshot through the gateway of one or more indices.
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-gateway-snapshot.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`ignoreUnavailable`::
|
||||
`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
`allowNoIndices`::
|
||||
`Boolean` -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
`[expandWildcards=open]`::
|
||||
`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
Options:::
|
||||
* `"open"`
|
||||
* `"closed"`
|
||||
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-stats-1-x]]
|
||||
=== `indices.stats`
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ NOTE: At this time, you must opt into the master API by setting the `apiVersion`
|
||||
* <<api-ping-master,ping>>
|
||||
* <<api-scroll-master,scroll>>
|
||||
* <<api-search-master,search>>
|
||||
* <<api-searchtemplate-master,searchTemplate>>
|
||||
* <<api-suggest-master,suggest>>
|
||||
* <<api-termvector-master,termvector>>
|
||||
* <<api-update-master,update>>
|
||||
@ -78,9 +79,9 @@ NOTE: At this time, you must opt into the master API by setting the `apiVersion`
|
||||
* <<api-indices-putsettings-master,indices.putSettings>>
|
||||
* <<api-indices-puttemplate-master,indices.putTemplate>>
|
||||
* <<api-indices-putwarmer-master,indices.putWarmer>>
|
||||
* <<api-indices-recovery-master,indices.recovery>>
|
||||
* <<api-indices-refresh-master,indices.refresh>>
|
||||
* <<api-indices-segments-master,indices.segments>>
|
||||
* <<api-indices-snapshotindex-master,indices.snapshotIndex>>
|
||||
* <<api-indices-stats-master,indices.stats>>
|
||||
* <<api-indices-status-master,indices.status>>
|
||||
* <<api-indices-updatealiases-master,indices.updateAliases>>
|
||||
@ -1526,6 +1527,31 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-searchtemplate-master]]
|
||||
=== `searchTemplate`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.searchTemplate([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
`type`::
|
||||
`String, String[], Boolean` -- A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-suggest-master]]
|
||||
=== `suggest`
|
||||
|
||||
@ -2140,8 +2166,6 @@ Options:::
|
||||
* `"m"`
|
||||
* `"g"`
|
||||
|
||||
`local`::
|
||||
`Boolean` -- Return local information, do not retrieve the state from master node (default: false)
|
||||
`masterTimeout`::
|
||||
`Date, Number` -- Explicit operation timeout for connection to master node
|
||||
`h`::
|
||||
@ -3408,6 +3432,35 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-recovery-master]]
|
||||
=== `indices.recovery`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.indices.recovery([params, [callback]])
|
||||
--------
|
||||
|
||||
// no description
|
||||
|
||||
The default method is `GET` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-recovery.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`detailed`::
|
||||
`Boolean` -- Whether to display detailed information about shard recovery
|
||||
`activeOnly`::
|
||||
`Boolean` -- Display only those recoveries that are currently on-going
|
||||
`human`::
|
||||
`Boolean` -- Whether to return time and byte values in human-readable format.
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-refresh-master]]
|
||||
=== `indices.refresh`
|
||||
|
||||
@ -3482,39 +3535,6 @@ Options:::
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-snapshotindex-master]]
|
||||
=== `indices.snapshotIndex`
|
||||
|
||||
[source,js]
|
||||
--------
|
||||
client.indices.snapshotIndex([params, [callback]])
|
||||
--------
|
||||
|
||||
Initiate a snapshot through the gateway of one or more indices.
|
||||
|
||||
The default method is `POST` and the usual <<api-conventions,params and return values>> apply. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-gateway-snapshot.html[the elasticsearch docs] for more about this method.
|
||||
|
||||
// no examples
|
||||
|
||||
|
||||
==== Params
|
||||
|
||||
[horizontal]
|
||||
`ignoreUnavailable`::
|
||||
`Boolean` -- Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
`allowNoIndices`::
|
||||
`Boolean` -- Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
`[expandWildcards=open]`::
|
||||
`String` -- Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
||||
Options:::
|
||||
* `"open"`
|
||||
* `"closed"`
|
||||
|
||||
`index`::
|
||||
`String, String[], Boolean` -- A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
|
||||
link:#[back to top]
|
||||
|
||||
[[api-indices-stats-master]]
|
||||
=== `indices.stats`
|
||||
|
||||
|
||||
@ -502,7 +502,6 @@ api.cat.prototype.plugins = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} params.bytes - The unit in which to display byte values
|
||||
* @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false)
|
||||
* @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node
|
||||
* @param {String, String[], Boolean} params.h - Comma-separated list of column names to display
|
||||
* @param {Boolean} params.help - Return help information
|
||||
@ -520,9 +519,6 @@ api.cat.prototype.recovery = ca({
|
||||
'g'
|
||||
]
|
||||
},
|
||||
local: {
|
||||
type: 'boolean'
|
||||
},
|
||||
masterTimeout: {
|
||||
type: 'time',
|
||||
name: 'master_timeout'
|
||||
@ -3204,6 +3200,46 @@ api.indices.prototype.putWarmer = ca({
|
||||
method: 'PUT'
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-recovery.html) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Boolean} params.detailed - Whether to display detailed information about shard recovery
|
||||
* @param {Boolean} params.activeOnly - Display only those recoveries that are currently on-going
|
||||
* @param {Boolean} params.human - Whether to return time and byte values in human-readable format.
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.recovery = ca({
|
||||
params: {
|
||||
detailed: {
|
||||
type: 'boolean',
|
||||
'default': false
|
||||
},
|
||||
activeOnly: {
|
||||
type: 'boolean',
|
||||
'default': false,
|
||||
name: 'active_only'
|
||||
},
|
||||
human: {
|
||||
type: 'boolean',
|
||||
'default': false
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
{
|
||||
fmt: '/<%=index%>/_recovery',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/_recovery'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-refresh.html) request
|
||||
*
|
||||
@ -3311,51 +3347,6 @@ api.indices.prototype.segments = ca({
|
||||
]
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-gateway-snapshot.html) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @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.
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
*/
|
||||
api.indices.prototype.snapshotIndex = ca({
|
||||
params: {
|
||||
ignoreUnavailable: {
|
||||
type: 'boolean',
|
||||
name: 'ignore_unavailable'
|
||||
},
|
||||
allowNoIndices: {
|
||||
type: 'boolean',
|
||||
name: 'allow_no_indices'
|
||||
},
|
||||
expandWildcards: {
|
||||
type: 'enum',
|
||||
'default': 'open',
|
||||
options: [
|
||||
'open',
|
||||
'closed'
|
||||
],
|
||||
name: 'expand_wildcards'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
{
|
||||
fmt: '/<%=index%>/_gateway/snapshot',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/_gateway/snapshot'
|
||||
}
|
||||
],
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-stats.html) request
|
||||
*
|
||||
@ -4730,6 +4721,41 @@ api.search = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
*/
|
||||
api.searchTemplate = ca({
|
||||
urls: [
|
||||
{
|
||||
fmt: '/<%=index%>/<%=type%>/_search/template',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
},
|
||||
type: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/<%=index%>/_search/template',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/_search/template'
|
||||
}
|
||||
],
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
|
||||
@ -502,7 +502,6 @@ api.cat.prototype.plugins = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} params.bytes - The unit in which to display byte values
|
||||
* @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false)
|
||||
* @param {Date, Number} params.masterTimeout - Explicit operation timeout for connection to master node
|
||||
* @param {String, String[], Boolean} params.h - Comma-separated list of column names to display
|
||||
* @param {Boolean} params.help - Return help information
|
||||
@ -520,9 +519,6 @@ api.cat.prototype.recovery = ca({
|
||||
'g'
|
||||
]
|
||||
},
|
||||
local: {
|
||||
type: 'boolean'
|
||||
},
|
||||
masterTimeout: {
|
||||
type: 'time',
|
||||
name: 'master_timeout'
|
||||
@ -3204,6 +3200,46 @@ api.indices.prototype.putWarmer = ca({
|
||||
method: 'PUT'
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-recovery.html) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Boolean} params.detailed - Whether to display detailed information about shard recovery
|
||||
* @param {Boolean} params.activeOnly - Display only those recoveries that are currently on-going
|
||||
* @param {Boolean} params.human - Whether to return time and byte values in human-readable format.
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.recovery = ca({
|
||||
params: {
|
||||
detailed: {
|
||||
type: 'boolean',
|
||||
'default': false
|
||||
},
|
||||
activeOnly: {
|
||||
type: 'boolean',
|
||||
'default': false,
|
||||
name: 'active_only'
|
||||
},
|
||||
human: {
|
||||
type: 'boolean',
|
||||
'default': false
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
{
|
||||
fmt: '/<%=index%>/_recovery',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/_recovery'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-refresh.html) request
|
||||
*
|
||||
@ -3311,51 +3347,6 @@ api.indices.prototype.segments = ca({
|
||||
]
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-gateway-snapshot.html) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @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.
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
*/
|
||||
api.indices.prototype.snapshotIndex = ca({
|
||||
params: {
|
||||
ignoreUnavailable: {
|
||||
type: 'boolean',
|
||||
name: 'ignore_unavailable'
|
||||
},
|
||||
allowNoIndices: {
|
||||
type: 'boolean',
|
||||
name: 'allow_no_indices'
|
||||
},
|
||||
expandWildcards: {
|
||||
type: 'enum',
|
||||
'default': 'open',
|
||||
options: [
|
||||
'open',
|
||||
'closed'
|
||||
],
|
||||
name: 'expand_wildcards'
|
||||
}
|
||||
},
|
||||
urls: [
|
||||
{
|
||||
fmt: '/<%=index%>/_gateway/snapshot',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/_gateway/snapshot'
|
||||
}
|
||||
],
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/indices-stats.html) request
|
||||
*
|
||||
@ -4730,6 +4721,41 @@ api.search = ca({
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
/**
|
||||
* Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String, String[], Boolean} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String, String[], Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
*/
|
||||
api.searchTemplate = ca({
|
||||
urls: [
|
||||
{
|
||||
fmt: '/<%=index%>/<%=type%>/_search/template',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
},
|
||||
type: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/<%=index%>/_search/template',
|
||||
req: {
|
||||
index: {
|
||||
type: 'list'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
fmt: '/_search/template'
|
||||
}
|
||||
],
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
api.snapshot = function SnapshotNS(transport) {
|
||||
this.transport = transport;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user