33 lines
506 B
Plaintext
33 lines
506 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.bulk({
|
|
index: "mv",
|
|
refresh: "true",
|
|
operations: [
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
a: 1,
|
|
b: [2, 1],
|
|
},
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
a: 2,
|
|
b: 3,
|
|
},
|
|
],
|
|
});
|
|
console.log(response);
|
|
|
|
const response1 = await client.esql.query({
|
|
query: "FROM mv | LIMIT 2",
|
|
});
|
|
console.log(response1);
|
|
----
|