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
The `maxRetries` parameter can be configured on a per requets basis, if set to zero it was defaulting to the client default. Now the client is honoring the request specific configuration.
82
95
83
-
96
+
[discrete]
84
97
===== Fix RequestOptions.body type to include null https://github.com/elastic/elasticsearch-js/pull/1300[#1300]
85
98
86
99
The Connection requets option types were not accepting `null` as valid value.
87
100
101
+
[discrete]
88
102
===== Fixed `size` and `maxRetries` parameters in helpers https://github.com/elastic/elasticsearch-js/pull/1284[#1284]
89
103
90
104
The `size` parameter was being passed too the scroll request, which was causing an error.
91
105
`maxRetries` setted to 0 was resulting in no request at all.
92
106
107
+
[discrete]
93
108
=== 7.9.0
94
109
110
+
[discrete]
95
111
==== Features
96
112
113
+
[discrete]
97
114
===== Add ability to disable the http agent https://github.com/elastic/elasticsearch-js/pull/1251[#1251]
98
115
99
116
If needed, the http agent can be disabled by setting it to `false`
@@ -107,6 +124,7 @@ const client = new Client({
107
124
})
108
125
----
109
126
127
+
[discrete]
110
128
===== Add support for a global context option https://github.com/elastic/elasticsearch-js/pull/1256[#1256]
111
129
112
130
Before this, you could set a `context` option in each request, but there was no way of setting it globally.
@@ -121,6 +139,7 @@ const client = new Client({
121
139
})
122
140
----
123
141
142
+
[discrete]
124
143
===== ESM support https://github.com/elastic/elasticsearch-js/pull/1235[#1235]
125
144
126
145
If you are using ES Modules, now you can easily import the client!
@@ -130,8 +149,10 @@ If you are using ES Modules, now you can easily import the client!
130
149
import { Client } from '@elastic/elasticsearch'
131
150
----
132
151
152
+
[discrete]
133
153
==== Fixes
134
154
155
+
[discrete]
135
156
===== Allow the client name to be a symbol https://github.com/elastic/elasticsearch-js/pull/1254[#1254]
136
157
137
158
It was possible in plain JavaScript, but not in TypeScript, now you can do it in TypeScript as well.
@@ -145,15 +166,18 @@ const client = new Client({
145
166
})
146
167
----
147
168
169
+
[discrete]
148
170
===== Fixed transport.request querystring type https://github.com/elastic/elasticsearch-js/pull/1240[#1240]
149
171
150
172
Only `Record<string, any>` was allowed. Now `string` is allowed as well.
151
173
174
+
[discrete]
152
175
===== Fixed type definitions https://github.com/elastic/elasticsearch-js/pull/1263[#1263]
153
176
154
177
* The `transport.request` defintion was incorrect, it was returning a `Promise<T>` instead of `TransportRequestPromise<T>`.
155
178
* The `refresh` parameter of most APIs was declared as `'true' | 'false' | 'wait_for'`, which was clunky. Now is `'wait_for' | boolean`.
156
179
180
+
[discrete]
157
181
===== Generate response type as boolean if the request is HEAD only https://github.com/elastic/elasticsearch-js/pull/1275[#1275]
158
182
159
183
All HEAD request will have the body casted to a boolean value, `true` in case of a 200 response, `false` in case of
Added the scheduling: 'lifo' option to the default HTTP agent configuration to avoid maximizing the open sockets
178
204
against Elasticsearch and lowering the risk of encountering socket timeouts.
179
205
This feature is only available from Node v14.5+, but it should be backported to v10 and v12. (https://github.com/nodejs/node/pull/33278[nodejs/node#33278])
180
206
207
+
[discrete]
181
208
===== Improve child API https://github.com/elastic/elasticsearch-js/pull/1245[#1245]
182
209
183
210
This pr introduce two changes which should not impact the surface API:
@@ -187,14 +214,18 @@ and improves the child creation performances by ~12%.
187
214
* The client no longer inherits from the EventEmitter class, but instead has an internal event emitter and exposes
188
215
only the API useful for the users, namely `emit, `on`, `once`, and `off`. The type definitions have been updated accordingly.
189
216
217
+
[discrete]
190
218
=== 7.8.0
191
219
220
+
[discrete]
192
221
==== Features
193
222
223
+
[discrete]
194
224
===== Support for Elasticsearch `v7.8`.
195
225
196
226
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.8/release-notes-7.8.0.html[here].
197
227
228
+
[discrete]
198
229
===== Added multi search helper https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
199
230
200
231
If you are sending search request at a high rate, this helper might be useful for you.
@@ -227,6 +258,7 @@ m.search(
227
258
)
228
259
----
229
260
261
+
[discrete]
230
262
===== Added timeout support in bulk and msearch helpers https://github.com/elastic/elasticsearch-js/pull/1206[#1206]
231
263
232
264
If there is a slow producer, the bulk helper might send data with a very large period of time, and if the process crashes for any reason, the data would be lost.
@@ -248,38 +280,48 @@ const m = client.helpers.msearch({
248
280
})
249
281
----
250
282
283
+
[discrete]
251
284
==== Internals
252
285
286
+
[discrete]
253
287
===== Use filter_path for improving the search helpers performances https://github.com/elastic/elasticsearch-js/pull/1199[#1199]
254
288
255
289
From now on, all he search helpers will use the `filter_path` option automatically when needed to retrieve only the hits source. This change will result in less netwprk traffic and improved deserialization performances.
Before this, the `documents` key that you can access in any search helper was computed as soon as we got the search result from Elasticsearch. With this change the `documents` key is now a getter, which makes this procees lazy, resulting in better performances and lower memory impact.
260
295
261
-
296
+
[discrete]
262
297
=== 7.7.1
263
298
299
+
[discrete]
264
300
==== Fixes
265
301
302
+
[discrete]
266
303
===== Disable client Helpers in Node.js < 10 - https://github.com/elastic/elasticsearch-js/pull/1194[#1194]
267
304
268
305
The client helpers can't be used in Node.js < 10 because it needs a custom flag to be able to use them.
269
306
Given that not every provider allows the user to specify cuatom Node.js flags, the Helpers has been disabled completely in Node.js < 10.
270
307
308
+
[discrete]
271
309
===== Force lowercase in all headers - https://github.com/elastic/elasticsearch-js/pull/1187[#1187]
272
310
273
311
Now all the user-provided headers names will be lowercased by default, so there will be no conflicts in case of the same header with different casing.
274
312
313
+
[discrete]
275
314
=== 7.7.0
276
315
316
+
[discrete]
277
317
==== Features
278
318
319
+
[discrete]
279
320
===== Support for Elasticsearch `v7.7`.
280
321
281
322
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.7/release-notes-7.7.0.html[here].
From now on, it will be possible to abort a request generated with the promise-styl API. If you abort a request generated from a promise, the promise will be rejected with a `RequestAbortedError`.
@@ -318,6 +362,7 @@ promise
318
362
promise.abort()
319
363
----
320
364
365
+
[discrete]
321
366
===== Major refactor of the Type Definitions - https://github.com/elastic/elasticsearch-js/pull/1119[#1119] https://github.com/elastic/elasticsearch-js/issues/1130[#1130] https://github.com/elastic/elasticsearch-js/pull/1132[#1132]
322
367
323
368
Now every API makes better use of the generics and overloading, so you can (or not, by default request/response bodies are `Record<string, any>`) define the request/response bodies in the generics.
This *should* not be a breaking change, as every generics defaults to `any`. It might happen to some users that the code breaks, but our test didn't detect any of it, probably because they were not robust enough. However, given the gigantic improvement in the developer experience, we have decided to release this change in the 7.x line.
335
380
381
+
[discrete]
336
382
==== Fixes
337
383
384
+
[discrete]
338
385
===== The `ConnectionPool.update` method now cleans the `dead` list - https://github.com/elastic/elasticsearch-js/issues/1122[#1122] https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
339
386
340
387
It can happen in a situation where we are updating the connections list and running sniff, leaving the `dead` list in a dirty state. Now the `ConnectionPool.update` cleans up the `dead` list every time, which makes way more sense given that all the new connections are alive.
341
388
389
+
[discrete]
342
390
===== `ConnectionPoolmarkDead` should ignore connections that no longer exists - https://github.com/elastic/elasticsearch-js/pull/1159[#1159]
343
391
344
392
It might happen that markDead is called just after a pool update, and in such case, the clint was adding the dead list a node that no longer exists, causing unhandled exceptions later.
345
393
394
+
[discrete]
346
395
===== Do not retry a request if the body is a stream - https://github.com/elastic/elasticsearch-js/pull/1143[#1143]
347
396
348
397
The client should not retry if it's sending a stream body, because it should store in memory a copy of the stream to be able to send it again, but since it doesn't know in advance the size of the stream, it risks to take too much memory.
349
398
Furthermore, copying everytime the stream is very an expensive operation.
350
399
400
+
[discrete]
351
401
===== Return an error if the request has been aborted - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
352
402
353
403
Until now, aborting a request was blocking the HTTP request, but never calling the callback or resolving the promise to notify the user. This is a bug because it could lead to dangerous memory leaks. From now on if the user calls the `request.abort()` method, the callback style API will be called with a `RequestAbortedError`, the promise will be rejected with `RequestAbortedError` as well.
354
404
405
+
[discrete]
355
406
=== 7.6.1
356
407
357
408
**Fixes:**
@@ -363,10 +414,12 @@ Until now, aborting a request was blocking the HTTP request, but never calling t
363
414
364
415
- Fix typo in api reference - https://github.com/elastic/elasticsearch-js/pull/1109[#1109]
365
416
417
+
[discrete]
366
418
=== 7.6.0
367
419
368
420
Support for Elasticsearch `v7.6`.
369
421
422
+
[discrete]
370
423
=== 7.5.1
371
424
372
425
**Fixes:**
@@ -382,6 +435,7 @@ Support for Elasticsearch `v7.6`.
382
435
- Add examples to reference - https://github.com/elastic/elasticsearch-js/pull/1076[#1076]
383
436
- Added new examples - https://github.com/elastic/elasticsearch-js/pull/1031[#1031]
384
437
438
+
[discrete]
385
439
=== 7.5.0
386
440
387
441
Support for Elasticsearch `v7.5`.
@@ -390,6 +444,7 @@ Support for Elasticsearch `v7.5`.
390
444
391
445
- X-Opaque-Id support https://github.com/elastic/elasticsearch-js/pull/997[#997]
392
446
447
+
[discrete]
393
448
=== 7.4.0
394
449
395
450
Support for Elasticsearch `v7.4`.
@@ -407,6 +462,7 @@ Support for Elasticsearch `v7.4`.
0 commit comments