(cherry picked from commit f737290d10)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
30 lines
636 B
Plaintext
30 lines
636 B
Plaintext
// This file is autogenerated, DO NOT EDIT
|
|
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
|
|
|
[source, js]
|
|
----
|
|
const response = await client.index({
|
|
index: "sales",
|
|
id: 1,
|
|
refresh: "true",
|
|
document: {
|
|
tags: ["car", "auto"],
|
|
comments: [
|
|
{
|
|
username: "baddriver007",
|
|
comment: "This car could have better brakes",
|
|
},
|
|
{
|
|
username: "dr_who",
|
|
comment: "Where's the autopilot? Can't find it",
|
|
},
|
|
{
|
|
username: "ilovemotorbikes",
|
|
comment: "This car has two extra wheels",
|
|
},
|
|
],
|
|
},
|
|
});
|
|
console.log(response);
|
|
----
|