Merge branch 'pr', Closes #134
This commit is contained in:
@ -9,7 +9,7 @@ test/integration/yaml_suite/log
|
||||
## generated files
|
||||
test/integration/yaml_suite/yaml_tests*.json
|
||||
test/integration/yaml_suite/index*.js
|
||||
src/elasticsearch*/
|
||||
src/_elasticsearch*/
|
||||
src/bower*/
|
||||
junit-*.xml
|
||||
elasticsearch*.log
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
# elasticsearch-js changelog
|
||||
|
||||
## 2.4 (Jul ?? 2014)
|
||||
## 2.4 (Jul 30 2014)
|
||||
- Added apiVersion `"1.3"`, which is now the default
|
||||
|
||||
## 2.3 (Jul 11 2014)
|
||||
- Added support for Node 0.11
|
||||
- Updated `bluebird`, which modified the [promise api](https://github.com/petkaantonov/bluebird/blob/v2.2.1/API.md) somewhat
|
||||
- moved the log generator into it's own package [makelogs](https://www.npmjs.org/package/makelogs)
|
||||
- [Lower the logging level of `Request complete`](https://github.com/elasticsearch/elasticsearch-js/pull/122)
|
||||
|
||||
## 2.2 (Mar 27 2014)
|
||||
- The default API version is now `'1.2'`
|
||||
@ -15,6 +16,9 @@
|
||||
|
||||
## 2.1 (Mar 27 2014)
|
||||
- The default API version is now `'1.1'`
|
||||
- Errors generated in the browser will now have stack traces
|
||||
- Clarified IE-support
|
||||
- Improvements to the bundled log-generator
|
||||
|
||||
## 2.0 (Mar 27 2014)
|
||||
- The default API version is now `'1.0'`
|
||||
@ -49,4 +53,4 @@
|
||||
|
||||
## pre 1.0
|
||||
- Another module, now know as es on npm, used the elasticsearch module name. This module had several pre-1.0
|
||||
releases so we started at 1.0 to prevent collisions in exiting projects. The history for that project is available [here](https://github.com/ncb000gt/node-es)
|
||||
releases so we started at 1.0 to prevent collisions in exiting projects. The history for that project is available [here](https://github.com/ncb000gt/node-es)
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
The official low-level Elasticsearch client for Node.js and the browser.
|
||||
|
||||
[](https://travis-ci.org/elasticsearch/elasticsearch-js?branch=2.3)
|
||||
[](https://coveralls.io/r/elasticsearch/elasticsearch-js?branch=2.3)
|
||||
[](https://travis-ci.org/elasticsearch/elasticsearch-js?branch=2.4)
|
||||
[](https://coveralls.io/r/elasticsearch/elasticsearch-js?branch=2.4)
|
||||
[](https://david-dm.org/elasticsearch/elasticsearch-js)
|
||||
|
||||
## Features
|
||||
@ -34,16 +34,17 @@ Check out the [Browser Builds](http://www.elasticsearch.org/guide/en/elasticsear
|
||||
</tr><tr>
|
||||
<td>download:</td>
|
||||
<td align="center">
|
||||
<a href="https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.4.zip">zip</a>
|
||||
<a href="https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.4.0.zip">zip</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.4.tar.gz">tar.gz</a>
|
||||
<a href="https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.4.0.tar.gz">tar.gz</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Docs
|
||||
- [Quick Start](http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/quick-start.html)
|
||||
- [Browser Builds](http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/browser-builds.html)
|
||||
- [API](http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/api-reference.html)
|
||||
- [Configuration](http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/configuration.html)
|
||||
- [Development/Contributing](https://github.com/elasticsearch/elasticsearch-js/blob/master/CONTRIBUTING.md)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
[[api-conventions]]
|
||||
== API Conventions
|
||||
=== Generic Parameters
|
||||
By default, all api methods accept the following parameters. They are omitted from the param lists of each method, just because.
|
||||
By default, all api methods accept the following parameters. They are omitted from the param lists of each method for brevity.
|
||||
|
||||
[horizontal]
|
||||
`method`::
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
[browser-builds]
|
||||
==== Browser Builds
|
||||
[[browser-builds]]
|
||||
== Browser Builds
|
||||
|
||||
We also provide builds of the elasticsearch.js client for use in the browser. These versions of the client are currently ***experimental***. We test these builds using https://saucelabs.com/u/elasticsearch-js[saucelabs] in Chrome, Firefox, and Internet Explorer 10, and 11.
|
||||
|
||||
While there is https://github.com/elasticsearch/elasticsearch-js/issues/96#issuecomment-42617480[a way to get it working in IE 9], the browser severly limits what you can do with cross-domain requests. Because of these limits, many of the API calls and other functionality do not work.
|
||||
|
||||
===== Bower
|
||||
=== Bower
|
||||
If you use bower to manage your dependencies, then just run:
|
||||
|
||||
[source,shell]
|
||||
@ -13,19 +13,27 @@ If you use bower to manage your dependencies, then just run:
|
||||
bower install elasticsearch
|
||||
---------
|
||||
|
||||
===== Download
|
||||
* v2.1.4: https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.4.zip[zip], https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.4.tar.gz[tar.gz]
|
||||
=== Download
|
||||
* v2.4.0: https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.4.0.zip[zip], https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.4.0.tar.gz[tar.gz]
|
||||
|
||||
|
||||
===== Angular Build (elasticsearch.angular.js)
|
||||
* Registers the elasticsearch object as a factory `esFactory`
|
||||
=== Angular Build
|
||||
* Registers the an `esFactory` factory in the `"elasticsearch"` module
|
||||
* Uses Angular's `$http` service
|
||||
* Returns promises using Angular's `$q` service to properly trigger digest cycles within Angular
|
||||
|
||||
NOTE: Checkout an example that integrates elasticsearch.js with angular https://github.com/spenceralger/elasticsearch-angular-example[on GitHub]
|
||||
|
||||
.Include the `"elasticsearch"` module in your app
|
||||
[source,js]
|
||||
-------------------
|
||||
var myApp = angular.module('myApp', ['elasticsearch']);
|
||||
-------------------
|
||||
|
||||
.Create a client instance and register it as a service
|
||||
[source,js]
|
||||
-------------------
|
||||
module.service('es', function (esFactory) {
|
||||
module.service('client', function (esFactory) {
|
||||
return esFactory({
|
||||
host: 'localhost:9200',
|
||||
// ...
|
||||
@ -33,7 +41,7 @@ module.service('es', function (esFactory) {
|
||||
});
|
||||
-------------------
|
||||
|
||||
===== jQuery Build (elasticsearch.jquery.js)
|
||||
=== jQuery Build
|
||||
* Uses jQuery's `.ajax()` functionality
|
||||
* Returns jQuery "promises"
|
||||
* Registers the module at `jQuery.es`
|
||||
|
||||
@ -18,8 +18,6 @@ include::development.asciidoc[]
|
||||
|
||||
include::api_methods.asciidoc[]
|
||||
|
||||
include::api_methods_1_2.asciidoc[]
|
||||
|
||||
include::api_methods_1_1.asciidoc[]
|
||||
|
||||
include::api_methods_1_0.asciidoc[]
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"description": "The official low-level Elasticsearch client for Node.js and the browser.",
|
||||
"main": "src/elasticsearch.js",
|
||||
"homepage": "http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html",
|
||||
"version": "2.1.4",
|
||||
"version": "2.4.0",
|
||||
"browser": {
|
||||
"./src/lib/connectors/index.js": "./src/lib/connectors/browser_index.js",
|
||||
"./src/lib/loggers/index.js": "./src/lib/loggers/browser_index.js",
|
||||
@ -87,4 +87,4 @@
|
||||
"engines": {
|
||||
"node": ">=0.8 <0.11"
|
||||
}
|
||||
}
|
||||
}
|
||||
2
src/lib/connectors/jquery.js
vendored
2
src/lib/connectors/jquery.js
vendored
@ -20,7 +20,7 @@ JqueryConnector.prototype.request = function (params, cb) {
|
||||
var ajax = {
|
||||
url: this.host.makeUrl(params),
|
||||
data: params.body,
|
||||
method: params.method,
|
||||
type: params.method,
|
||||
dataType: 'text',
|
||||
headers: this.host.getHeaders(params.headers),
|
||||
done: cb
|
||||
|
||||
Reference in New Issue
Block a user