Skip to content

Commit 07eefde

Browse files
author
Spencer Alger
committed
Typos and such
1 parent e68eeab commit 07eefde

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Official *low-level* client for Elasticsearch.
88
- Generalized, pluggable architecture. See [replacing core components](TODO: details the peices that are replaceable)
99
- Configurable, automatic discovery of cluster nodes
1010
- Persistent, Keep-Alive connections
11-
- Load balancing (with pluggable selection strategy) across all availible nodes.
11+
- Load balancing (with pluggable selection strategy) across all available nodes.
1212

1313
## Node and the browser
1414

15-
elasticsearch.js works great in node, as well as modern browsers (many thanks to [browserify](https://github.com/substack/browserify)!!).
15+
elasticsearch.js works great in node, as well as modern browsers (many thanks to [browserify](https://github.com/substack/node-browserify)!!).
1616

1717
- Node:
1818

@@ -33,22 +33,30 @@ npm install --save elasticsearch
3333

3434
Download one of these browser-ready builds, or install them with `bower`
3535

36+
NOTE: The entire API is compatible with IE 10+, Chrome, Firefox, Safari, and Opera. **IE 8 & 9** only support GET and POST requests cross-domain which is how the `'XhrConnection'` class makes it's requests.
37+
3638
- [elasticsearch.js](dist/elasticsearch.min.js) - [dev](dist/elasticsearch.js)
3739
- uses the browser's native XMLHttpRequest object
38-
- Fully Compatible with IE 10+, Chrome, Firefox, Safari, Opera
39-
- Only GET and POST requests available in IE 8 & 9
4040
- Node style callbacks or promises provided by [when.js](https://github.com/cujojs/when)
4141

4242
```
4343
bower install elasticsearch
4444
```
4545

4646
- [elasticsearch.angular.js](dist/elasticsearch.angular.min.js) - [dev](dist/elasticsearch.angular.js)
47-
- Uses angular's $http servive
48-
- Returns promisses using angular's $q servive (Adds an `abort()` method)
47+
- Uses Angular's $http service
48+
- Returns promises using Angular's $q service (Adds an `abort()` method)
4949

5050
```
5151
bower install elasticsearch-angular
52+
```
53+
54+
- [elasticsearch.jquery.js](dist/elasticsearch.jquery.min.js) - [dev](dist/elasticsearch.jquery.js)
55+
- Uses jQuery's .ajax() method
56+
- Returns jQuery deferred objects (Adds an abort() method)
57+
58+
```
59+
bower install elasticsearch-jquery
5260
```
5361

5462
## Configuration
@@ -95,12 +103,9 @@ Default:
95103
- Node: `'http'`
96104
- Browser: `'xhr'`
97105
- Angular Build: `'angular'`
106+
- jQuery Build: `'jquery'`
98107

99-
Options:
100-
- Node: `'http'`
101-
- Browser: based on bundle, `'xhr'`, `'angular'`, and `'jquery'` are currently available
102-
103-
Defines the class that will be created once for each node/host that the client communicates with. If you are looking to implement a special protocol you will probably start by writing a Connection class and specifying it here.
108+
Defines the class that will be created once for each node/host that the client communicates with. If you are looking to implement a protocol besides HTTP you will probably start by writing a Connection class and specifying it here.
104109

105110
### selector
106111
Type: `String`, `Function`
@@ -111,23 +116,23 @@ Options:
111116
- `'roundRobin'`
112117
- `'random'`
113118

114-
Defined a function that will be used to select a connection from the ConnectionPool. It should received a single argument, the list of "active" connections, and return the connection to use. Use this selector to implement special logic for your client such as prefering connections in a certain rack, or datacenter.
119+
This function will be used to select a connection from the ConnectionPool. It should received a single argument, the list of "active" connections, and return the connection to use. Use this selector to implement special logic for your client such as preferring nodes in a certain rack or data-center.
115120

116-
To make this function asynchronous, accept a second argument which will be the callback which should be called as a Node style callback with a possible error: `cb(err, selectedConnection)`.
121+
To make this function asynchronous, accept a second argument which will be the callback to use. The callback should be called Node-style, a possible error like `cb(err, selectedConnection)`.
117122

118123
### sniffOnStart
119124
Type: `Boolean`
120125

121126
Default: `false`
122127

123-
Should the client attempt to detect the rest of the cluster when it is first instanciated?
128+
Should the client attempt to detect the rest of the cluster when it is first instantiated?
124129

125130
### sniffAfterRequests
126131
Type: `Number` or `false`
127132

128133
Default: `false`
129134

130-
After `n` requests, perform a sniff operation and ensure out list of nodes is up to date
135+
After `n` requests, perform a sniff operation and ensure out list of nodes is up to date.
131136

132137

133138
### sniffOnConnectionFail
@@ -149,7 +154,7 @@ Type: `Number`
149154

150155
Default: 10000
151156

152-
How many milliseconds can the connection take before the request is aboorted and retried. (TODO: timeout errors shouldn't cause a retry).
157+
How many milliseconds can the connection take before the request is aborted and retried. (TODO: timeout errors shouldn't cause a retry).
153158

154159
### deadTimeout
155160
Type: `Number`
@@ -170,7 +175,7 @@ Type: `Function`
170175

171176
Default: simple, not much going on [here](src/lib/client_config.js#L65).
172177

173-
This function will receive a list of nodes received durring a sniff. The list of nodes should be transformed into an array of objects which will be fed to the [Host](src/lib/host.js) class. (TODO: allow this function to be async).
178+
This function will receive a list of nodes received during a sniff. The list of nodes should be transformed into an array of objects which will be fed to the [Host](src/lib/host.js) class. (TODO: allow this function to be async).
174179

175180
## API
176181

0 commit comments

Comments
 (0)