revert default api back to 1.7, until 2.0 GA is released

This commit is contained in:
spalger
2015-08-26 09:45:13 -07:00
parent c3c4c089f7
commit 9ef05d297f
7 changed files with 790 additions and 766 deletions

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@ Default in Node:::
+
WARNING: This default will track the latest version of Elasticsearch, and is only intended to be used during development. It is highly recommended that you set this parameter in all code that is headed to production.
Default ::: `"1.3"`
Default ::: `"1.7"`
Options in node :::
* `"2.0"`

View File

@ -19,7 +19,7 @@
"blanket": {
"pattern": "specified in test/unit/coverage.js"
},
"default_api_branch": "2.0",
"default_api_branch": "1.7",
"supported_es_branches": [
"2.0",
"1.7",

View File

@ -2198,6 +2198,7 @@ api.indices.prototype.close = ca({
* @param {Object} params - An object with parameters used to carry out this action
* @param {Date, Number} params.timeout - Explicit operation timeout
* @param {Date, Number} params.masterTimeout - Specify timeout for connection to master
* @param {Boolean} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {String} params.index - The name of the index
*/
api.indices.prototype.create = ca({
@ -2208,6 +2209,10 @@ api.indices.prototype.create = ca({
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
@ -3393,6 +3398,7 @@ api.indices.prototype.putAlias = ca({
* @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 {Boolean} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {String, String[], Boolean} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {String} params.type - The name of the document type
*/
@ -3423,6 +3429,10 @@ api.indices.prototype.putMapping = ca({
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [

View File

@ -2198,6 +2198,7 @@ api.indices.prototype.close = ca({
* @param {Object} params - An object with parameters used to carry out this action
* @param {Date, Number} params.timeout - Explicit operation timeout
* @param {Date, Number} params.masterTimeout - Specify timeout for connection to master
* @param {Boolean} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {String} params.index - The name of the index
*/
api.indices.prototype.create = ca({
@ -2208,6 +2209,10 @@ api.indices.prototype.create = ca({
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
@ -3393,6 +3398,7 @@ api.indices.prototype.putAlias = ca({
* @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 {Boolean} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {String, String[], Boolean} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {String} params.type - The name of the document type
*/
@ -3423,6 +3429,10 @@ api.indices.prototype.putMapping = ca({
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [

View File

@ -66,7 +66,7 @@ function Client(config) {
}
EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '2.0');
EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.7');
if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) {
config.sniffEndpoint = '/_cluster/nodes';
}