You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ Default:
106
106
- Angular Build: `'angular'`
107
107
- jQuery Build: `'jquery'`
108
108
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.
110
110
111
111
### selector
112
112
Type: `String`, `Function`
@@ -119,7 +119,7 @@ Options:
119
119
120
120
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.
121
121
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)`.
123
123
124
124
### sniffOnStart
125
125
Type: `Boolean`
@@ -133,7 +133,7 @@ Type: `Number` or `false`
133
133
134
134
Default: `false`
135
135
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.
137
137
138
138
139
139
### sniffOnConnectionFail
@@ -162,25 +162,25 @@ Type: `Number`
162
162
163
163
Default: 30000
164
164
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))
166
166
167
167
### maxSockets
168
168
Type: `Number`
169
169
170
170
Default: 10
171
171
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).
173
173
174
174
### nodesToHostCallback
175
175
Type: `Function`
176
176
177
177
Default: simple, not much going on [here](src/lib/client_config.js#L65).
178
178
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).
180
180
181
181
## API
182
182
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.
184
184
185
185
### Generic Params
186
186
@@ -268,4 +268,4 @@ es.search({
268
268
### dead nodes
269
269
Q: When is a connection/node considered dead?
270
270
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