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: docs/reference/api-reference.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -980,6 +980,7 @@ PUT my-index-000001/_doc/1?version=2&version_type=external
980
980
"id": "elkbee"
981
981
}
982
982
}
983
+
```
983
984
984
985
In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
985
986
If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).
Copy file name to clipboardExpand all lines: docs/reference/basic-config.md
-56Lines changed: 0 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -82,35 +82,27 @@ auth: {
82
82
}
83
83
```
84
84
85
-
---
86
-
87
85
### `maxRetries`
88
86
89
87
Type: `number`<br>
90
88
Default: `3`
91
89
92
90
Max number of retries for each request.
93
91
94
-
---
95
-
96
92
### `requestTimeout`
97
93
98
94
Type: `number`<br>
99
95
Default: `No value`
100
96
101
97
Max request timeout in milliseconds for each request.
102
98
103
-
---
104
-
105
99
### `pingTimeout`
106
100
107
101
Type: `number`<br>
108
102
Default: `3000`
109
103
110
104
Max ping request timeout in milliseconds for each request.
111
105
112
-
---
113
-
114
106
### `sniffInterval`
115
107
116
108
Type: `number, boolean`<br>
@@ -122,35 +114,27 @@ Perform a sniff operation every `n` milliseconds.
122
114
Sniffing might not be the best solution. Before using the various `sniff` options, review this [blog post](https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how).
123
115
:::
124
116
125
-
---
126
-
127
117
### `sniffOnStart`
128
118
129
119
Type: `boolean`<br>
130
120
Default: `false`
131
121
132
122
Perform a sniff once the client is started. Be sure to review the sniffing best practices [blog post](https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how).
133
123
134
-
---
135
-
136
124
### `sniffEndpoint`
137
125
138
126
Type: `string`<br>
139
127
Default: `'_nodes/_all/http'`
140
128
141
129
Endpoint to ping during a sniff. Be sure to review the sniffing best practices [blog post](https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how).
142
130
143
-
---
144
-
145
131
### `sniffOnConnectionFault`
146
132
147
133
Type: `boolean`<br>
148
134
Default: `false`
149
135
150
136
Perform a sniff on connection fault. Be sure to review the sniffing best practices [blog post](https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how).
151
137
152
-
---
153
-
154
138
### `resurrectStrategy`
155
139
156
140
Type: `string`<br>
@@ -159,17 +143,13 @@ Default: `'ping'`
159
143
Configure the node resurrection strategy.<br>
160
144
Options: `'ping'`, `'optimistic'`, `'none'`
161
145
162
-
---
163
-
164
146
### `suggestCompression`
165
147
166
148
Type: `boolean`<br>
167
149
Default: `false`
168
150
169
151
Adds an `accept-encoding` header to every request.
170
152
171
-
---
172
-
173
153
### `compression`
174
154
175
155
Type: `string, boolean`<br>
@@ -178,17 +158,13 @@ Default: `false`
178
158
Enables gzip request body compression.<br>
179
159
Options: `'gzip'`, `false`
180
160
181
-
---
182
-
183
161
### `tls`
184
162
185
163
Type: `http.SecureContextOptions`<br>
186
164
Default: `null`
187
165
188
166
The [tls configuraton](https://nodejs.org/api/tls.html).
189
167
190
-
---
191
-
192
168
### `proxy`
193
169
194
170
Type: `string, URL`<br>
@@ -208,8 +184,6 @@ const client = new Client({
208
184
})
209
185
```
210
186
211
-
---
212
-
213
187
### `agent`
214
188
215
189
Type: `http.AgentOptions, function`<br>
@@ -237,8 +211,6 @@ const client = new Client({
237
211
})
238
212
```
239
213
240
-
---
241
-
242
214
### `nodeFilter`
243
215
244
216
Type: `function`
@@ -260,8 +232,6 @@ function defaultNodeFilter (conn) {
260
232
}
261
233
```
262
234
263
-
---
264
-
265
235
### `nodeSelector`
266
236
267
237
Type: `function`<br>
@@ -279,8 +249,6 @@ function nodeSelector (connections) {
279
249
}
280
250
```
281
251
282
-
---
283
-
284
252
### `generateRequestId`
285
253
286
254
Type: `function`<br>
@@ -297,17 +265,13 @@ function generateRequestId (params, options) {
297
265
}
298
266
```
299
267
300
-
---
301
-
302
268
### `name`
303
269
304
270
Type: `string, symbol`<br>
305
271
Default: `elasticsearch-js`
306
272
307
273
The name to identify the client instance in the events.
308
274
309
-
---
310
-
311
275
### `opaqueIdPrefix`
312
276
313
277
Type: `string`<br>
@@ -316,35 +280,27 @@ Default: `null`
316
280
A string that will be use to prefix any `X-Opaque-Id` header.
317
281
See [`X-Opaque-Id` support](/reference/observability.md#_x_opaque_id_support) for more details.
318
282
319
-
---
320
-
321
283
### `headers`
322
284
323
285
Type: `object`<br>
324
286
Default: `{}`
325
287
326
288
A set of custom headers to send in every request.
327
289
328
-
---
329
-
330
290
### `context`
331
291
332
292
Type: `object`<br>
333
293
Default: `null`
334
294
335
295
A custom object that you can use for observability in your events. It will be merged with the API level context option.
336
296
337
-
---
338
-
339
297
### `enableMetaHeader`
340
298
341
299
Type: `boolean`<br>
342
300
Default: `true`
343
301
344
302
If true, adds an header named `'x-elastic-client-meta'`, containing some minimal telemetry data, such as the client and platform version.
345
303
346
-
---
347
-
348
304
### `cloud`
349
305
350
306
Type: `object`<br>
@@ -366,43 +322,33 @@ const client = new Client({
366
322
})
367
323
```
368
324
369
-
---
370
-
371
325
### `disablePrototypePoisoningProtection`
372
326
373
327
Default: `true`
374
328
375
329
`boolean`, `'proto'`, `'constructor'` - The client can protect you against prototype poisoning attacks. For more information, refer to [Square Brackets are the Enemy](https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08). If needed, you can enable prototype poisoning protection entirely (`false`) or one of the two checks (`'proto'` or `'constructor'`). For performance reasons, it is disabled by default. To learn more, refer to the [`secure-json-parse` documentation](https://github.com/fastify/secure-json-parse).
376
330
377
-
---
378
-
379
331
### `caFingerprint`
380
332
381
333
Type: `string`<br>
382
334
Default: `null`
383
335
384
336
If configured, verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied fingerprint. Only accepts SHA256 digest fingerprints.
385
337
386
-
---
387
-
388
338
### `maxResponseSize`
389
339
390
340
Type: `number`<br>
391
341
Default: `null`
392
342
393
343
When configured, `maxResponseSize` verifies that the uncompressed response size is lower than the configured number. If it’s higher, the request will be canceled. The `maxResponseSize` cannot be higher than the value of `buffer.constants.MAX_STRING_LENGTH`.
394
344
395
-
---
396
-
397
345
### `maxCompressedResponseSize`
398
346
399
347
Type: `number`<br>
400
348
Default: `null`
401
349
402
350
When configured, `maxCompressedResponseSize` verifies that the compressed response size is lower than the configured number. If it’s higher, the request will be canceled. The `maxCompressedResponseSize` cannot be higher than the value of `buffer.constants.MAX_STRING_LENGTH`.
403
351
404
-
---
405
-
406
352
### `redaction`
407
353
408
354
Type: `object`<br>
@@ -414,8 +360,6 @@ Options for how to redact potentially sensitive data from metadata attached to `
414
360
[Read about redaction](/reference/advanced-config.md#redaction) for more details
0 commit comments