added 2.0 as bonefide apiVersion

This commit is contained in:
spalger
2015-08-19 10:26:53 -07:00
parent 1b653af040
commit 4fa70fe645
17 changed files with 5043 additions and 466 deletions

View File

@ -11,8 +11,8 @@ before_cache:
sudo: false
secure: "UFAGQ6m/VnEahbj9vttY9YoA5h5rEBE6K7AvEEbWnt+VKppV+w3hu3HZxgKr8C9PWhCzqlGvsLh+kCqykZhISU1fBCK/Ttp3nSpMvvF5tI2u51Rj1qZ/7NUGRU0qVI9KFt0rJeXMJwq3fivb1H6aojfPD1gsIte7NHNjUfd0iUg="
env:
- ES_RELEASE=1.7.1 RUN=NODE_INTEGRATION
- ES_RELEASE=1.7.1 RUN=NODE_UNIT,CHECK_COVERAGE,SAUCE_LABS
- ES_REF=2.0 RUN=NODE_INTEGRATION
- ES_REF=2.0 RUN=NODE_UNIT,CHECK_COVERAGE,SAUCE_LABS
script: node ./scripts/ci.js
email:
recipients:

View File

@ -1,5 +1,8 @@
# elasticsearch-js changelog
## 7.0 (Sep ? 2015)
- Added apiVersion `"2.0"`, which is now the default
## 6.1 (Aug 18 2015)
- Added experimental support for apiVersion `"2.0"`
- Added support for [many more status codes](https://github.com/elastic/elasticsearch-js/blob/ea6721127fb239951fb86ac3b386e182b26f683c/src/lib/errors.js#L94-L138) so that "unknown error" is far less likely.

View File

@ -57,7 +57,7 @@ You can probably find help in the #elasticsearch-js or #kibana rooms on [freenod
## Supported Elasticsearch Versions
[![Supporting Elasticsearch Version 0.90 to 1.7](http://img.shields.io/badge/elasticsearch-0.90--1.7-green.svg?style=flat-square)](http://build-eu-00.elasticsearch.org/job/es-js_nightly/)
[![Supporting Elasticsearch Version 0.90 to 2.0](http://img.shields.io/badge/elasticsearch-0.90--2.0-green.svg?style=flat-square)](http://build-eu-00.elasticsearch.org/job/es-js_nightly/)
Elasticsearch.js provides support for, and is regularly tested against, Elasticsearch releases 0.90.12 and greater. We also test against the latest changes in several branches in the Elasticsearch repository. To tell the client which version of Elastisearch you are using, and therefore the API it should provide, set the `apiVersion` config param. [More info](http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/configuration.html#config-options)

File diff suppressed because it is too large Load Diff

View File

@ -127,10 +127,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

View File

@ -129,10 +129,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

View File

@ -129,10 +129,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

View File

@ -129,10 +129,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

View File

@ -129,10 +129,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

View File

@ -129,10 +129,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

View File

@ -129,10 +129,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

View File

@ -129,10 +129,12 @@ client.count({
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
query: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -54,6 +54,7 @@ WARNING: This default will track the latest version of Elasticsearch, and is onl
Default ::: `"1.3"`
Options in node :::
* `"2.0"`
* `"1.7"`
* `"1.6"`
* `"1.5"`
@ -66,9 +67,9 @@ Options in node :::
* `"master"` (unstable)
Options in the browser :::
* `"2.0"`
* `"1.7"`
* `"1.6"`
* `"1.5"`

View File

@ -19,7 +19,9 @@
"blanket": {
"pattern": "specified in test/unit/coverage.js"
},
"default_api_branch": "2.0",
"supported_es_branches": [
"2.0",
"1.7",
"1.6",
"1.5",
@ -31,10 +33,8 @@
"0.90"
],
"unstable_es_branches": [
"master",
"2.0"
],
"default_api_branch": "1.7"
"master"
]
},
"devDependencies": {
"aliasify": "~1.2.4",

View File

@ -1,6 +1,5 @@
module.exports = {
'2.0': require('./2_0'),
'1.7': require('./1_7'),
'1.6': require('./1_6'),
'1.5': require('./1_5')
'1.6': require('./1_6')
};

View File

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