30 lines
552 B
Plaintext
30 lines
552 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.updateByQuery({
|
|
index: "my-index-000001",
|
|
slice: {
|
|
id: 0,
|
|
max: 2,
|
|
},
|
|
script: {
|
|
source: "ctx._source['extra'] = 'test'",
|
|
},
|
|
});
|
|
console.log(response);
|
|
|
|
const response1 = await client.updateByQuery({
|
|
index: "my-index-000001",
|
|
slice: {
|
|
id: 1,
|
|
max: 2,
|
|
},
|
|
script: {
|
|
source: "ctx._source['extra'] = 'test'",
|
|
},
|
|
});
|
|
console.log(response1);
|
|
----
|