Update docs for v8 (#1572)

This commit is contained in:
Tomas Della Vedova
2022-02-11 10:23:07 +01:00
committed by GitHub
parent a0c5c98a99
commit 759138c375
37 changed files with 315 additions and 1264 deletions

View File

@ -23,9 +23,9 @@ const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })
async function run () {
const { body: bulkResponse } = await client.bulk({
const bulkResponse = await client.bulk({
refresh: true,
body: [
operations: [
{ index: { _index: 'game-of-thrones' } },
{
character: 'Ned Stark',
@ -51,7 +51,7 @@ async function run () {
process.exit(1)
}
const { body } = await client.transport.request({
const response = await client.transport.request({
method: 'POST',
path: '/game-of-thrones/_search',
body: {
@ -64,7 +64,7 @@ async function run () {
querystring: {}
})
console.log(body)
console.log(response)
}
run().catch(console.log)