Files
elasticsearch-js/docs/doc_examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc
Tomas Della Vedova 28205e97cf Update docs examples (#1081)
* Updated enabled files list

* Generated docs examples

* Generated docs examples
2020-02-06 12:04:29 +01:00

81 lines
1.2 KiB
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({
body: [
{
update: {
_id: '1',
_index: 'index1',
retry_on_conflict: 3
}
},
{
doc: {
field: 'value'
}
},
{
update: {
_id: '0',
_index: 'index1',
retry_on_conflict: 3
}
},
{
script: {
source: 'ctx._source.counter += params.param1',
lang: 'painless',
params: {
param1: 1
}
},
upsert: {
counter: 1
}
},
{
update: {
_id: '2',
_index: 'index1',
retry_on_conflict: 3
}
},
{
doc: {
field: 'value'
},
doc_as_upsert: true
},
{
update: {
_id: '3',
_index: 'index1',
_source: true
}
},
{
doc: {
field: 'value'
}
},
{
update: {
_id: '4',
_index: 'index1'
}
},
{
doc: {
field: 'value'
},
_source: true
}
]
})
console.log(response)
----