Update docs to use async/await (#667)
* [docs] update readme and examples to use async/await * [apis] regenerate (including updated examples)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
.Create or update a document
|
||||
[source,js]
|
||||
---------
|
||||
client.index({
|
||||
const response = await client.index({
|
||||
index: 'myindex',
|
||||
type: 'mytype',
|
||||
id: '1',
|
||||
@ -10,7 +10,5 @@ client.index({
|
||||
tags: ['y', 'z'],
|
||||
published: true,
|
||||
}
|
||||
}, function (error, response) {
|
||||
|
||||
});
|
||||
---------
|
||||
---------
|
||||
|
||||
Reference in New Issue
Block a user