* [docs] update readme and examples to use async/await * [apis] regenerate (including updated examples)
15 lines
230 B
Plaintext
15 lines
230 B
Plaintext
.Create or update a document
|
|
[source,js]
|
|
---------
|
|
const response = await client.index({
|
|
index: 'myindex',
|
|
type: 'mytype',
|
|
id: '1',
|
|
body: {
|
|
title: 'Test 1',
|
|
tags: ['y', 'z'],
|
|
published: true,
|
|
}
|
|
});
|
|
---------
|