diff --git a/docs/examples/bulk.asciidoc b/docs/examples/bulk.asciidoc index 74725c9e9..c357d5130 100644 --- a/docs/examples/bulk.asciidoc +++ b/docs/examples/bulk.asciidoc @@ -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 {jsclient}/api-reference.html#_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 <>. [source,js] ---- diff --git a/docs/examples/exists.asciidoc b/docs/examples/exists.asciidoc index 29a39a196..3553796fb 100644 --- a/docs/examples/exists.asciidoc +++ b/docs/examples/exists.asciidoc @@ -6,7 +6,7 @@ Check that the document `/game-of-thrones/1` exists. NOTE: Since this API uses the `HEAD` method, the body value will be boolean. [source,js] ---------- +---- 'use strict' const { Client } = require('@elastic/elasticsearch') @@ -34,4 +34,4 @@ async function run () { } run().catch(console.log) ---------- \ No newline at end of file +---- diff --git a/docs/examples/get.asciidoc b/docs/examples/get.asciidoc index f6dd94ddf..fe0268647 100644 --- a/docs/examples/get.asciidoc +++ b/docs/examples/get.asciidoc @@ -1,12 +1,12 @@ [[get_examples]] === Get -The get API allows to get a typed JSON document from the index based on its id. -The following example gets a JSON document from an index called +The get API allows to get a typed JSON document from the index based on its id. +The following example gets a JSON document from an index called `game-of-thrones`, under a type called `_doc`, with id valued `'1'`. [source,js] ---------- +---- 'use strict' const { Client } = require('@elastic/elasticsearch') @@ -34,4 +34,4 @@ async function run () { } run().catch(console.log) ---------- \ No newline at end of file +---- diff --git a/docs/examples/ignore.asciidoc b/docs/examples/ignore.asciidoc index de5577dcd..0b4c6fa98 100644 --- a/docs/examples/ignore.asciidoc +++ b/docs/examples/ignore.asciidoc @@ -62,4 +62,4 @@ async function run () { } run().catch(console.log) ----- \ No newline at end of file +---- diff --git a/docs/examples/scroll.asciidoc b/docs/examples/scroll.asciidoc index 0f23a1bc1..87f302876 100644 --- a/docs/examples/scroll.asciidoc +++ b/docs/examples/scroll.asciidoc @@ -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 <>. [source,js] ---- @@ -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] diff --git a/docs/examples/update.asciidoc b/docs/examples/update.asciidoc index 3c83acd25..b7e0272ae 100644 --- a/docs/examples/update.asciidoc +++ b/docs/examples/update.asciidoc @@ -1,12 +1,12 @@ [[update_examples]] === Update -The update API allows updates of a specific document using the given script. In -the following example, we will index a document that also tracks how many times +The update API allows updates of a specific document using the given script. In +the following example, we will index a document that also tracks how many times a character has said the given quote, and then we will update the `times` field. [source,js] ---------- +---- 'use strict' const { Client } = require('@elastic/elasticsearch') @@ -48,12 +48,12 @@ async function run () { run().catch(console.log) ---------- +---- With the update API, you can also run a partial update of a document. [source,js] ---------- +---- 'use strict' const { Client } = require('@elastic/elasticsearch') @@ -92,4 +92,4 @@ async function run () { run().catch(console.log) ---------- \ No newline at end of file +---- diff --git a/docs/examples/update_by_query.asciidoc b/docs/examples/update_by_query.asciidoc index d17b5c455..80c52fd90 100644 --- a/docs/examples/update_by_query.asciidoc +++ b/docs/examples/update_by_query.asciidoc @@ -1,12 +1,12 @@ [[update_by_query_examples]] === Update By Query -The simplest usage of _update_by_query just performs an update on every document -in the index without changing the source. This is useful to pick up a new +The simplest usage of _update_by_query just performs an update on every document +in the index without changing the source. This is useful to pick up a new property or some other online mapping change. [source,js] ---------- +---- 'use strict' const { Client } = require('@elastic/elasticsearch') @@ -57,4 +57,4 @@ async function run () { run().catch(console.log) ---------- +---- diff --git a/package.json b/package.json index 17366f82c..902abf626 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@elastic/elasticsearch", - "version": "9.0.0-alpha.2", + "version": "9.0.0-alpha.3", "versionCanary": "9.0.0-canary.0", "description": "The official Elasticsearch client for Node.js", "main": "./index.js",