Files
elasticsearch-js/docs/_examples/create.asciidoc
Spencer 83a464ac66 Update docs to use async/await (#667)
* [docs] update readme and examples to use async/await

* [apis] regenerate (including updated examples)
2018-05-23 14:31:34 -07:00

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
}
});
---------