Files
elasticsearch-js/docs/_examples/create.asciidoc
Spencer 9e3b71510f [15.x] Update docs to use async/await (#667) (#668)
Backports the following commits to 15.x:
 - Update docs to use async/await  (#667)
2018-05-23 14:32:16 -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
}
});
---------