Update docs for v8 (#1572)

This commit is contained in:
Tomas Della Vedova
2022-02-11 10:23:07 +01:00
committed by delvedor
parent 221f9a9798
commit 5086a19512
37 changed files with 315 additions and 1264 deletions

View File

@ -12,9 +12,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',
@ -40,8 +40,8 @@ async function run () {
process.exit(1)
}
const { body } = await client.msearch({
body: [
const result = await client.msearch({
searches: [
{ index: 'game-of-thrones' },
{ query: { match: { character: 'Daenerys' } } },
@ -50,7 +50,7 @@ async function run () {
]
})
console.log(body.responses)
console.log(result.responses)
}
run().catch(console.log)