Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test run of new docs #2481

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8210607
Test run of new docs
JoshMock Nov 19, 2024
6151aab
Fix section headers on generated types
JoshMock Nov 19, 2024
ab21735
Use section headers for shared types
JoshMock Nov 19, 2024
4afd72b
List API functions
JoshMock Nov 19, 2024
e0372ee
More iteration on generated docs
JoshMock Nov 19, 2024
be8fc5a
Testing to see if docs gen CI is actually working
JoshMock Nov 20, 2024
15a43f3
Still testing
JoshMock Nov 20, 2024
b463776
Fix links to API requests
JoshMock Nov 20, 2024
d9938f7
Generate heading IDs
JoshMock Nov 20, 2024
7a997b3
Fix number type links
JoshMock Nov 20, 2024
70a3ef4
More type definitions, with fixed links (hopefully)
JoshMock Nov 20, 2024
6c8d6e7
Fixes to shared types
JoshMock Nov 20, 2024
e0f845f
Change request/response section IDs
JoshMock Nov 20, 2024
2a2e2f0
Fix duplicate includes
JoshMock Nov 20, 2024
018b153
Fix more duplicate reference names
JoshMock Nov 21, 2024
356fe2d
Fix stray invalid type links
JoshMock Nov 21, 2024
f99496e
Fix more bad links
JoshMock Nov 21, 2024
8d619c9
More link fixes
JoshMock Nov 21, 2024
647dac8
Remove broken URLs to other docs
JoshMock Nov 21, 2024
c3e7619
Restructure reference docs directory
JoshMock Dec 2, 2024
bd5c3d9
More docs fixes
JoshMock Dec 3, 2024
1fde515
Improvements to get docs to build
JoshMock Dec 4, 2024
eef1430
More docs changes
JoshMock Dec 4, 2024
f04303f
Drop missing import
JoshMock Dec 4, 2024
6c3e2b5
Rename reference page
JoshMock Dec 4, 2024
86a5736
Update links to reference docs from other files
JoshMock Dec 5, 2024
36d61ed
Updates to generated docs
JoshMock Dec 5, 2024
6683fa3
WIP generating API reference docs with @microsoft/api-extractor
JoshMock Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/lib/client.d.ts",
"bundledPackages": [
"@elastic/*"
],
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/api-extractor/<unscopedPackageName>.api.json",
"includeForgottenExports": true
},
"dtsRollup": {
"enabled": false
},
"tsdocMetadata": {
"enabled": true,
"tsdocMetadataFilePath": "<projectFolder>/api-extractor/tsdoc-metadata.json"
},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
}
}
}
}
10 changes: 3 additions & 7 deletions docs/basic-config.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ _Default:_ `3`
_Default:_ `30000`

|`pingTimeout`
|`number` - Max ping request timeout in milliseconds for each request. +
|`number` - Max number of milliseconds a `ClusterConnectionPool` will wait when pinging nodes before marking them dead. +
_Default:_ `3000`

|`sniffInterval`
Expand All @@ -105,17 +105,13 @@ _Default:_ `'_nodes/_all/http'`
_Default:_ `false`

|`resurrectStrategy`
|`string` - Configure the node resurrection strategy. +
|`string` - Strategy for resurrecting dead nodes when using `ClusterConnectionPool`. 'ping' will issue a test request to a node and resurrect it if it responds. 'optimistic' marks a node as alive without testing it. 'none' will never attempt to revive a dead connection. +
_Options:_ `'ping'`, `'optimistic'`, `'none'` +
_Default:_ `'ping'`

|`suggestCompression`
|`boolean` - Adds `accept-encoding` header to every request. +
_Default:_ `false`

|`compression`
|`string, boolean` - Enables gzip request body compression. +
_Options:_ `'gzip'`, `false` +
_Options:_ `true`, `false` +
_Default:_ `false`

|`tls`
Expand Down
5 changes: 2 additions & 3 deletions docs/changelog.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ https://www.elastic.co/guide/en/elasticsearch/reference/8.15/release-notes-8.15.
===== OpenTelemetry zero-code instrumentation support

For those that use an observability service that supports OpenTelemetry spans, the client will now automatically generate traces for each Elasticsearch request it makes.
See {jsclient}/observability.html#_opentelemetry[the docs]
for more information.
See <<o11y-otel,the docs>> for more information.

[discrete]
=== 8.14.1
Expand Down Expand Up @@ -329,7 +328,7 @@ https://www.elastic.co/guide/en/elasticsearch/reference/8.9/release-notes-8.9.0.
[discrete]
===== Allow document to be overwritten in `onDocument` iteratee of bulk helper https://github.com/elastic/elasticsearch-js/pull/1732[#1732]

In the {jsclient}/client-helpers.html#bulk-helper[bulk helper], documents could not be modified before being sent to Elasticsearch. It is now possible to {jsclient}/client-helpers.html#_modifying_a_document_before_operation[modify a document] before sending it.
In the <<bulk-helper,bulk helper>>, documents could not be modified before being sent to Elasticsearch. It is now possible to <<bulk-modify-doc,modify a document>> before sending it.

[discrete]
==== Fixes
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/bulk.asciidoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[[bulk_examples]]
=== Bulk

With the {jsclient}/api-reference.html#_bulk[`bulk` API], you can perform multiple index/delete operations in a
With the <<client.bulk,`bulk` API>>, you can perform multiple index/delete operations in a
single API call. The `bulk` API significantly increases indexing speed.

NOTE: You can also use the {jsclient}/client-helpers.html[bulk helper].
NOTE: You can also use the <<bulk-helper,bulk helper>>.

[source,js]
----
Expand Down
24 changes: 12 additions & 12 deletions docs/examples/scroll.asciidoc
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[[scroll_examples]]
=== Scroll

While a search request returns a single “page” of results, the scroll API can be
used to retrieve large numbers of results (or even all results) from a single
search request, in much the same way as you would use a cursor on a traditional
While a search request returns a single “page” of results, the scroll API can be
used to retrieve large numbers of results (or even all results) from a single
search request, in much the same way as you would use a cursor on a traditional
database.

Scrolling is not intended for real time user requests, but rather for processing
large amounts of data, for example in order to reindex the contents of one index
Scrolling is not intended for real time user requests, but rather for processing
large amounts of data, for example in order to reindex the contents of one index
into a new index with a different configuration.

NOTE: The results that are returned from a scroll request reflect the state of
the index at the time that the initial search request was made, like a snapshot
in time. Subsequent changes to documents (index, update or delete) will only
NOTE: The results that are returned from a scroll request reflect the state of
the index at the time that the initial search request was made, like a snapshot
in time. Subsequent changes to documents (index, update or delete) will only
affect later search requests.

In order to use scrolling, the initial search request should specify the scroll
parameter in the query string, which tells {es} how long it should keep the
In order to use scrolling, the initial search request should specify the scroll
parameter in the query string, which tells {es} how long it should keep the
“search context” alive.

NOTE: Did you know that we provide an helper for sending scroll requests? You can find it {jsclient}/client-helpers.html[here].
NOTE: Did you know that we provide an helper for sending scroll requests? You can find it <<scroll-search-helper,here>>.

[source,js]
----
Expand Down Expand Up @@ -113,7 +113,7 @@ async function run () {
run().catch(console.log)
----

Another cool usage of the `scroll` API can be done with Node.js ≥ 10, by using
Another cool usage of the `scroll` API can be done with Node.js ≥ 10, by using
async iteration!

[source,js]
Expand Down
1 change: 1 addition & 0 deletions docs/helpers.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ console.log(result)
----

[discrete]
[[bulk-modify-doc]]
==== Modifying a document before operation

~Added~ ~in~ ~`v8.8.2`~
Expand Down
6 changes: 1 addition & 5 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
= Elasticsearch JavaScript Client

include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[]
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]

include::introduction.asciidoc[]
include::getting-started.asciidoc[]
include::changelog.asciidoc[]
Expand All @@ -17,8 +14,7 @@ include::integrations.asciidoc[]
include::observability.asciidoc[]
include::transport.asciidoc[]
include::typescript.asciidoc[]
include::reference.asciidoc[]
include::reference/main.asciidoc[]
include::examples/index.asciidoc[]
include::helpers.asciidoc[]
include::redirects.asciidoc[]
include::timeout-best-practices.asciidoc[]
1 change: 1 addition & 0 deletions docs/observability.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ features.
All of these observability features are documented below.

[discrete]
[[o11y-otel]]
==== OpenTelemetry

The client supports OpenTelemetry's https://opentelemetry.io/docs/zero-code/js/[zero-code
Expand Down
Loading