Skip to content

Commit 926b468

Browse files
[docs] Fix various syntax and rendering errors (#2776)
1 parent be0b96b commit 926b468

File tree

4 files changed

+170
-81
lines changed

4 files changed

+170
-81
lines changed

docs/reference/api-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ PUT my-index-000001/_doc/1?version=2&version_type=external
980980
"id": "elkbee"
981981
}
982982
}
983+
```
983984

984985
In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
985986
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).

docs/reference/basic-config.md

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -82,35 +82,27 @@ auth: {
8282
}
8383
```
8484

85-
---
86-
8785
### `maxRetries`
8886

8987
Type: `number`<br>
9088
Default: `3`
9189

9290
Max number of retries for each request.
9391

94-
---
95-
9692
### `requestTimeout`
9793

9894
Type: `number`<br>
9995
Default: `No value`
10096

10197
Max request timeout in milliseconds for each request.
10298

103-
---
104-
10599
### `pingTimeout`
106100

107101
Type: `number`<br>
108102
Default: `3000`
109103

110104
Max ping request timeout in milliseconds for each request.
111105

112-
---
113-
114106
### `sniffInterval`
115107

116108
Type: `number, boolean`<br>
@@ -122,35 +114,27 @@ Perform a sniff operation every `n` milliseconds.
122114
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).
123115
:::
124116

125-
---
126-
127117
### `sniffOnStart`
128118

129119
Type: `boolean`<br>
130120
Default: `false`
131121

132122
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).
133123

134-
---
135-
136124
### `sniffEndpoint`
137125

138126
Type: `string`<br>
139127
Default: `'_nodes/_all/http'`
140128

141129
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).
142130

143-
---
144-
145131
### `sniffOnConnectionFault`
146132

147133
Type: `boolean`<br>
148134
Default: `false`
149135

150136
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).
151137

152-
---
153-
154138
### `resurrectStrategy`
155139

156140
Type: `string`<br>
@@ -159,17 +143,13 @@ Default: `'ping'`
159143
Configure the node resurrection strategy.<br>
160144
Options: `'ping'`, `'optimistic'`, `'none'`
161145

162-
---
163-
164146
### `suggestCompression`
165147

166148
Type: `boolean`<br>
167149
Default: `false`
168150

169151
Adds an `accept-encoding` header to every request.
170152

171-
---
172-
173153
### `compression`
174154

175155
Type: `string, boolean`<br>
@@ -178,17 +158,13 @@ Default: `false`
178158
Enables gzip request body compression.<br>
179159
Options: `'gzip'`, `false`
180160

181-
---
182-
183161
### `tls`
184162

185163
Type: `http.SecureContextOptions`<br>
186164
Default: `null`
187165

188166
The [tls configuraton](https://nodejs.org/api/tls.html).
189167

190-
---
191-
192168
### `proxy`
193169

194170
Type: `string, URL`<br>
@@ -208,8 +184,6 @@ const client = new Client({
208184
})
209185
```
210186

211-
---
212-
213187
### `agent`
214188

215189
Type: `http.AgentOptions, function`<br>
@@ -237,8 +211,6 @@ const client = new Client({
237211
})
238212
```
239213

240-
---
241-
242214
### `nodeFilter`
243215

244216
Type: `function`
@@ -260,8 +232,6 @@ function defaultNodeFilter (conn) {
260232
}
261233
```
262234

263-
---
264-
265235
### `nodeSelector`
266236

267237
Type: `function`<br>
@@ -279,8 +249,6 @@ function nodeSelector (connections) {
279249
}
280250
```
281251

282-
---
283-
284252
### `generateRequestId`
285253

286254
Type: `function`<br>
@@ -297,17 +265,13 @@ function generateRequestId (params, options) {
297265
}
298266
```
299267

300-
---
301-
302268
### `name`
303269

304270
Type: `string, symbol`<br>
305271
Default: `elasticsearch-js`
306272

307273
The name to identify the client instance in the events.
308274

309-
---
310-
311275
### `opaqueIdPrefix`
312276

313277
Type: `string`<br>
@@ -316,35 +280,27 @@ Default: `null`
316280
A string that will be use to prefix any `X-Opaque-Id` header.
317281
See [`X-Opaque-Id` support](/reference/observability.md#_x_opaque_id_support) for more details.
318282

319-
---
320-
321283
### `headers`
322284

323285
Type: `object`<br>
324286
Default: `{}`
325287

326288
A set of custom headers to send in every request.
327289

328-
---
329-
330290
### `context`
331291

332292
Type: `object`<br>
333293
Default: `null`
334294

335295
A custom object that you can use for observability in your events. It will be merged with the API level context option.
336296

337-
---
338-
339297
### `enableMetaHeader`
340298

341299
Type: `boolean`<br>
342300
Default: `true`
343301

344302
If true, adds an header named `'x-elastic-client-meta'`, containing some minimal telemetry data, such as the client and platform version.
345303

346-
---
347-
348304
### `cloud`
349305

350306
Type: `object`<br>
@@ -366,43 +322,33 @@ const client = new Client({
366322
})
367323
```
368324

369-
---
370-
371325
### `disablePrototypePoisoningProtection`
372326

373327
Default: `true`
374328

375329
`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).
376330

377-
---
378-
379331
### `caFingerprint`
380332

381333
Type: `string`<br>
382334
Default: `null`
383335

384336
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.
385337

386-
---
387-
388338
### `maxResponseSize`
389339

390340
Type: `number`<br>
391341
Default: `null`
392342

393343
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`.
394344

395-
---
396-
397345
### `maxCompressedResponseSize`
398346

399347
Type: `number`<br>
400348
Default: `null`
401349

402350
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`.
403351

404-
---
405-
406352
### `redaction`
407353

408354
Type: `object`<br>
@@ -414,8 +360,6 @@ Options for how to redact potentially sensitive data from metadata attached to `
414360
[Read about redaction](/reference/advanced-config.md#redaction) for more details
415361
::::
416362

417-
---
418-
419363
### `serverMode`
420364

421365
Type: `string`<br>

0 commit comments

Comments
 (0)