* [docs] update readme and examples to use async/await * [apis] regenerate (including updated examples)
17 lines
251 B
Plaintext
17 lines
251 B
Plaintext
.Create a document
|
|
[source,js]
|
|
---------
|
|
await client.create({
|
|
index: 'myindex',
|
|
type: 'mytype',
|
|
id: '1',
|
|
body: {
|
|
title: 'Test 1',
|
|
tags: ['y', 'z'],
|
|
published: true,
|
|
published_at: '2013-01-01',
|
|
counter: 1
|
|
}
|
|
});
|
|
---------
|