Skip to content

Commit 0fa5da3

Browse files
author
Spencer Alger
committed
more typos
1 parent 09a38ab commit 0fa5da3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Default:
106106
- Angular Build: `'angular'`
107107
- jQuery Build: `'jquery'`
108108

109-
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.
109+
Defines the class that will be used to create connections. If you are looking to implement a protocol besides HTTP you will probably start by writing a Connection class and specifying it here.
110110

111111
### selector
112112
Type: `String`, `Function`
@@ -119,7 +119,7 @@ Options:
119119

120120
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.
121121

122-
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)`.
122+
To make this function asynchronous, accept a second argument which will be the callback to use. The callback should be called Node-style, with a possible error like `cb(err, selectedConnection)`.
123123

124124
### sniffOnStart
125125
Type: `Boolean`
@@ -133,7 +133,7 @@ Type: `Number` or `false`
133133

134134
Default: `false`
135135

136-
After `n` requests, perform a sniff operation and ensure out list of nodes is up to date.
136+
After `n` requests, perform a sniff operation and ensure our list of nodes is up to date.
137137

138138

139139
### sniffOnConnectionFail
@@ -162,25 +162,25 @@ Type: `Number`
162162

163163
Default: 30000
164164

165-
How many milliseconds should a dead a connection/node sit and wait before it is ping-ed? (see [node death](#node-death))
165+
How many milliseconds should a dead connection/node sit and wait before it is ping-ed? (see [node death](#node-death))
166166

167167
### maxSockets
168168
Type: `Number`
169169

170170
Default: 10
171171

172-
How many sockets should a connection/node keep to the server? These sockets are currently kept alive ***forever*** (not like nodes current "keep alive" sockets).
172+
How many sockets should a connection keep to it's corresponding Elasticsearch node? These sockets are currently kept alive ***forever*** (not like nodes current "keep alive" sockets).
173173

174174
### nodesToHostCallback
175175
Type: `Function`
176176

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

179-
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).
179+
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 each be used to create [Host](src/lib/host.js) objects. (TODO: allow this function to be async).
180180

181181
## API
182182

183-
To maintain consistency across all the low-level clients ([PHP](https://github.com/elasticsearch/elasticsearch-php), [Python](https://github.com/elasticsearch/elasticsearch-ph), [Ruby](https://github.com/elasticsearch/elasticsearch-ruby), [Perl](https://github.com/elasticsearch/elasticsearch-perl)), all API methods accept an object with parameters and a callback. If you don't pass the callback, the functions will return a promise.
183+
To maintain consistency across all the low-level clients ([PHP](https://github.com/elasticsearch/elasticsearch-php), [Python](https://github.com/elasticsearch/elasticsearch-ph), [Ruby](https://github.com/elasticsearch/elasticsearch-ruby), [Perl](https://github.com/elasticsearch/elasticsearch-perl)) all API methods accept an object with parameters and a callback. If you don't pass the callback, the functions will return a promise.
184184

185185
### Generic Params
186186

@@ -268,4 +268,4 @@ es.search({
268268
### dead nodes
269269
Q: When is a connection/node considered dead?
270270

271-
A; A connection is considered dead when a request to it does not complete properly. If the server responds with any status, even 500, it is not considered dead.
271+
A: A connection is considered dead when a request to it does not complete properly. If the server responds with any status, even 500, it is not considered dead.

0 commit comments

Comments
 (0)